-
Notifications
You must be signed in to change notification settings - Fork 45
chore(docs): textfield type story #4485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
Preview deployments for this pull request: www - |
| <Story story="RequiredEn" /> | ||
|
|
||
| ### Type | ||
| Since `Textfield` is based on native `input`, you can use most of the `type` values that `input` supports, but we have chosen to remove some of them from our exported type. You can see the valid type values in this select menu. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Since `Textfield` is based on native `input`, you can use most of the `type` values that `input` supports, but we have chosen to remove some of them from our exported type. You can see the valid type values in this select menu. | |
| Since `Textfield` is based on native `input`, you can use most of the `type` values that `input` supports, but we have chosen to remove some of them from our exported type. You can see the valid type values in the select menu below. |
| <Story story="Required" /> | ||
|
|
||
| ### Type | ||
| Siden `Textfield` er basert på native `input`, kan du bruke de fleste `type`-verdiene `input` støtter, men vi har valgt å fjerne noen av de fra vår eksporterte type. Du kan se de gyldige type verdiene i denne nedtrekksmenyen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Siden `Textfield` er basert på native `input`, kan du bruke de fleste `type`-verdiene `input` støtter, men vi har valgt å fjerne noen av de fra vår eksporterte type. Du kan se de gyldige type verdiene i denne nedtrekksmenyen. | |
| Siden `Textfield` er basert på native `input`, kan du bruke de fleste `type`-verdiene `input` støtter, men vi har valgt å fjerne noen av de fra vår eksporterte type. Du kan se de gyldige type verdiene i nedtrekksmenyen nedenfor. |
| <Select | ||
| defaultValue='text' | ||
| onChange={(e) => setType(e.target.value as TextfieldProps['type'])} | ||
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <Select | |
| defaultValue='text' | |
| onChange={(e) => setType(e.target.value as TextfieldProps['type'])} | |
| > | |
| <Select | |
| defaultValue='text' | |
| lang='en' | |
| onChange={(e) => setType(e.target.value as TextfieldProps['type'])} | |
| > |
resolves #4479
For some reason we allow checkbox and radio, but this breaks visually if there is a label set so I did not include those
Instead of making a seperate english story only to replace one word, I made a global utility selector
data-lang="no | en"to translate inline text in stories