Skip to content

Commit

Permalink
chore: add TextField story type=number
Browse files Browse the repository at this point in the history
  • Loading branch information
mimokmt committed Mar 1, 2024
1 parent 95da174 commit 870b0a7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/react/src/components/TextField/TextField.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@ const Container = styled.div`

export const Default = {}

export const Number: StoryObj<typeof TextField> = {
render: function Render(args) {
const [count, setCount] = useState(0)
return (
<Container>
<TextField
{...args}
type="number"
value={count.toString()}
onChange={(value) => setCount(parseInt(value))}
onWheel={(e) => {
e.currentTarget.blur()
e.stopPropagation()
}}
/>
</Container>
)
},
}

export const HasLabel = {
args: {
showLabel: true,
Expand Down

0 comments on commit 870b0a7

Please sign in to comment.