|
1
|
import type { Meta, StoryObj } from "@storybook/react" |
|
2
|
|
|
3
|
import { Input } from "./input" |
|
4
|
|
|
5
|
const meta: Meta<typeof Input> = { |
|
6
|
title: "Components/Input", |
|
7
|
component: Input, |
|
8
|
parameters: { |
|
9
|
layout: "centered", |
|
10
|
}, |
|
11
|
} |
|
12
|
|
|
13
|
export default meta |
|
14
|
|
|
15
|
type Story = StoryObj<typeof Input> |
|
16
|
|
|
17
|
export const Default: Story = { |
|
18
|
args: { |
|
19
|
placeholder: "Placeholder", |
|
20
|
}, |
|
21
|
} |
|
22
|
|
|
23
|
export const Disabled: Story = { |
|
24
|
args: { |
|
25
|
value: "Floyd Mayweather", |
|
26
|
disabled: true, |
|
27
|
}, |
|
28
|
} |
|
29
|
|
|
30
|
export const Invalid: Story = { |
|
31
|
args: { |
|
32
|
placeholder: "Placeholder", |
|
33
|
required: true, |
|
34
|
}, |
|
35
|
} |
|
36
|
|
|
37
|
export const Password: Story = { |
|
38
|
args: { |
|
39
|
type: "password", |
|
40
|
}, |
|
41
|
} |
|
42
|
|
|
43
|
export const Search: Story = { |
|
44
|
args: { |
|
45
|
type: "search", |
|
46
|
placeholder: "Search", |
|
47
|
}, |
|
48
|
} |
|
49
|
|
|
50
|
export const Small: Story = { |
|
51
|
args: { |
|
52
|
size: "small", |
|
53
|
placeholder: "Placeholder", |
|
54
|
}, |
|
55
|
} |