|
1
|
import type { Meta, StoryObj } from "@storybook/react" |
|
2
|
|
|
3
|
import { Text } from "./text" |
|
4
|
|
|
5
|
const meta: Meta<typeof Text> = { |
|
6
|
title: "Components/Text", |
|
7
|
component: Text, |
|
8
|
argTypes: { |
|
9
|
size: { |
|
10
|
control: { |
|
11
|
type: "select", |
|
12
|
}, |
|
13
|
options: ["base", "large", "xlarge"], |
|
14
|
}, |
|
15
|
weight: { |
|
16
|
control: { |
|
17
|
type: "select", |
|
18
|
}, |
|
19
|
options: ["regular", "plus"], |
|
20
|
}, |
|
21
|
family: { |
|
22
|
control: { |
|
23
|
type: "select", |
|
24
|
}, |
|
25
|
options: ["sans", "mono"], |
|
26
|
}, |
|
27
|
}, |
|
28
|
parameters: { |
|
29
|
layout: "centered", |
|
30
|
}, |
|
31
|
} |
|
32
|
|
|
33
|
export default meta |
|
34
|
|
|
35
|
type Story = StoryObj<typeof Text> |
|
36
|
|
|
37
|
export const BaseRegularSans: Story = { |
|
38
|
args: { |
|
39
|
size: "base", |
|
40
|
weight: "regular", |
|
41
|
family: "sans", |
|
42
|
children: "I am a paragraph", |
|
43
|
}, |
|
44
|
} |
|
45
|
|
|
46
|
export const BasePlusSans: Story = { |
|
47
|
args: { |
|
48
|
size: "base", |
|
49
|
weight: "plus", |
|
50
|
family: "sans", |
|
51
|
children: "I am a paragraph", |
|
52
|
}, |
|
53
|
} |
|
54
|
|
|
55
|
export const LargeRegularSans: Story = { |
|
56
|
args: { |
|
57
|
size: "large", |
|
58
|
weight: "regular", |
|
59
|
family: "sans", |
|
60
|
children: "I am a paragraph", |
|
61
|
}, |
|
62
|
} |
|
63
|
|
|
64
|
export const LargePlusSans: Story = { |
|
65
|
args: { |
|
66
|
size: "large", |
|
67
|
weight: "plus", |
|
68
|
family: "sans", |
|
69
|
children: "I am a paragraph", |
|
70
|
}, |
|
71
|
} |
|
72
|
|
|
73
|
export const XLargeRegularSans: Story = { |
|
74
|
args: { |
|
75
|
size: "xlarge", |
|
76
|
weight: "regular", |
|
77
|
family: "sans", |
|
78
|
children: "I am a paragraph", |
|
79
|
}, |
|
80
|
} |
|
81
|
|
|
82
|
export const XLargePlusSans: Story = { |
|
83
|
args: { |
|
84
|
size: "xlarge", |
|
85
|
weight: "plus", |
|
86
|
family: "sans", |
|
87
|
|
|
88
|
children: "I am a paragraph", |
|
89
|
}, |
|
90
|
} |
|
91
|
|
|
92
|
export const BaseRegularMono: Story = { |
|
93
|
args: { |
|
94
|
size: "base", |
|
95
|
weight: "regular", |
|
96
|
family: "mono", |
|
97
|
children: "I am a paragraph", |
|
98
|
}, |
|
99
|
} |
|
100
|
|
|
101
|
export const BasePlusMono: Story = { |
|
102
|
args: { |
|
103
|
size: "base", |
|
104
|
weight: "plus", |
|
105
|
family: "mono", |
|
106
|
children: "I am a paragraph", |
|
107
|
}, |
|
108
|
} |
|
109
|
|
|
110
|
export const LargeRegularMono: Story = { |
|
111
|
args: { |
|
112
|
size: "large", |
|
113
|
weight: "regular", |
|
114
|
family: "mono", |
|
115
|
children: "I am a paragraph", |
|
116
|
}, |
|
117
|
} |
|
118
|
|
|
119
|
export const LargePlusMono: Story = { |
|
120
|
args: { |
|
121
|
size: "large", |
|
122
|
weight: "plus", |
|
123
|
family: "mono", |
|
124
|
children: "I am a paragraph", |
|
125
|
}, |
|
126
|
} |
|
127
|
|
|
128
|
export const XLargeRegularMono: Story = { |
|
129
|
args: { |
|
130
|
size: "xlarge", |
|
131
|
weight: "regular", |
|
132
|
family: "mono", |
|
133
|
children: "I am a paragraph", |
|
134
|
}, |
|
135
|
} |
|
136
|
|
|
137
|
export const XLargePlusMono: Story = { |
|
138
|
args: { |
|
139
|
size: "xlarge", |
|
140
|
weight: "plus", |
|
141
|
family: "mono", |
|
142
|
children: "I am a paragraph", |
|
143
|
}, |
|
144
|
} |