-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate TextInput to TypeScript (#2342)
* Migrate textinput to TS * Add story * formatting * organize imports
- Loading branch information
1 parent
3718cea
commit 70fcb81
Showing
5 changed files
with
80 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
|
||
import TextInput from './TextInput' | ||
|
||
export default { | ||
title: 'Components/TextInput', | ||
component: TextInput, | ||
} as Meta | ||
|
||
type Story = StoryObj<typeof TextInput> | ||
|
||
export const TextInputWithLabel: Story = { | ||
args: { | ||
label: 'Name', | ||
placeholder: 'Write your name', | ||
}, | ||
render: (args) => { | ||
return <TextInput {...args} /> | ||
}, | ||
} | ||
|
||
export const TextInputWithPlaceholder: Story = { | ||
args: { | ||
placeholder: 'Type your age', | ||
type: 'number', | ||
}, | ||
render: (args) => { | ||
return <TextInput {...args} /> | ||
}, | ||
} | ||
|
||
export const TextInputWithIcon: Story = { | ||
args: { | ||
icon: 'search', | ||
placeholder: 'Search', | ||
}, | ||
render: (args) => { | ||
return <TextInput {...args} /> | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters