Skip to content

Commit

Permalink
fix: add textinput note
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhdaware committed Aug 20, 2024
1 parent 80a087f commit 888ad8e
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,10 @@ TextInputTypeNumber.args = {
placeholder: 'Enter any random number',
};

// @ts-expect-error: Just another undocumented, untyped storybook property ;__;
TextInputTypeNumber.story = {
parameters: {
docs: {
storyDescription: `You might notice that type number allows you to enter other characters as well. That's because instead of setting type number internally, we prefer inputMode numeric. Checkout this article for the reasoning - <b><a href="https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/">Why the GOV.UK Design System team changed the input type for numbers</a></b> \n\nIf you have a usecase of only allowing number in field, you can handle that on validations end.`,
TextInputTypeNumber.parameters = {
docs: {
description: {
story: `You might notice that type number allows you to enter other characters as well. That's because instead of setting type number internally, we prefer inputMode numeric. Checkout this article for the reasoning - <b><a href="https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/">Why the GOV.UK Design System team changed the input type for numbers</a></b> \n\nIf you have a usecase of only allowing number in field, you can handle that on validations end.`,
},
},
};
Expand Down

0 comments on commit 888ad8e

Please sign in to comment.