Conversation
There was a problem hiding this comment.
For this, due to the addition of the cva library, let’s use it for anything related to variants and themes. For reference, please check the updated Alert component in the latest develop branch which uses cva.
Apply this same feedback to other PRs.
There was a problem hiding this comment.
Also use cn instead of clsx thourghout the codebase.
There was a problem hiding this comment.
Please check out the new Alert and MultiSelect components in the latest develop branch, which adds new interaction tests in the form of Storybook stories in file format component-name.interactions.stories.tsx.
Please add the same for all the PRs you have opened, and make sure the tests actually cover how users interact with the components, replicating real user behavior. Also, remove the old tests, as everything should now be tested through the interaction tests.
|
@b1ink0 updated TextInput Component |
There was a problem hiding this comment.
I think this file is unrelated to this PR. Please revert it.
There was a problem hiding this comment.
You're right. That change was made to fix a type compatibility issue introduced during refactoring, but it's unrelated to this PR. i have reverted the file.
|
@b1ink0 can you recheck |
Summary
Adds a new
TextInputcomponent to the Frappe UI React library, providing a flexible single-line text input with multiple variants, validation states, prefix/suffix slots, and debounce functionality.Features
subtle,outlinesm,md,lg,xlsuccess,warning,errorfor form feedbackImplementation Details
ink-*,surface-*,outline-*) for theming consistency(size?) => ReactNodefor size-aware renderingclsxfor conditional class compositionuseIdhook whenhtmlIdnot providedtypes.tsfilelucide-reactLoader2 spinnerFiles Added/Modified
textInput.tsx— Main component implementation with forwardReftypes.ts— TypeScript type definitionstextInput.stories.tsx— Storybook stories with autodocsindex.ts— Exportstests/textInput.tsx— Unit testsStorybook
Testing
Checklist
(args?) => ReactNode#91
textinput.mp4