Can we add maxLength and other configs in text field of controls add-on? #15027
neetutanwar
started this conversation in
Ideas
Replies: 1 comment
-
|
It looks like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Storybook is great!
We have started using it for building components, we do have a requirement to restrict the number of characters in copy and headers fields. We are using the Controls add-on for changing the content of a component, but currently, there is no option to pass configs to the text component of the controls add-on just like we have for the Number component to handle the min and max value.
I was wondering if we can have some basic and useful configs for the text input field. e.g.
MaxLength - Option to enable max length property in the text input field to controls the no characters a field can store.
something like this:

Validations - Ability to pass regex and validate text input against it.
file reference: https://github.com/storybookjs/storybook/blob/next/lib/components/src/controls/Text.tsx
Beta Was this translation helpful? Give feedback.
All reactions