Skip to content
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

add input variants #125

Merged
merged 1 commit into from
May 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 41 additions & 4 deletions src/components/Input/Input.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,50 @@ export default { title: "Components/Input", component: Input };
export const _Input = {
render: () => (
<>
<Input placeholder={"something"} />
<h3>Controlled components</h3>
<Input placeholder={"with no content"} value="" />
<br />

<Input placeholder={"something"} error="that's an error" />
<Input placeholder={"something"} value="with content" />
<br />
<Input
placeholder={"something"}
value=""
error="that's an error without content"
/>
<br />
<Input
placeholder={"something"}
value="with content"
error="that's an error with content"
/>
<br />
<Input
placeholder={"something"}
value=""
warning="that's a warning without content"
/>
<br />
<Input
placeholder={"something"}
value="123"
warning="that's a warning with content"
/>
<br />

<Input placeholder={"something"} warning="that's a warning" />
<h3>Uncontrolled components</h3>
<Input placeholder={"something"} defaultValue="" />
<br />
<Input
placeholder={"something"}
defaultValue=""
error="that's an error with|without content"
/>
<br />
<Input
placeholder={"something"}
defaultValue=""
warning="that's a warning with|without content"
/>
</>
),
};