Skip to content

Commit 09b3e64

Browse files
Add small form control examples
1 parent a6fdc0c commit 09b3e64

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

stories/Form Elements/Checkboxes.stories.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,24 @@ export const WithHintText: Story = {
6767
),
6868
};
6969

70+
export const Small: Story = {
71+
args: {
72+
...Standard.args,
73+
legendProps: { isPageHeading: true, size: 'm' },
74+
small: true,
75+
},
76+
render: Standard.render,
77+
};
78+
79+
export const SmallWithHintText: Story = {
80+
args: {
81+
...WithHintText.args,
82+
legendProps: { isPageHeading: true, size: 'm' },
83+
small: true,
84+
},
85+
render: WithHintText.render,
86+
};
87+
7088
export const WithDisabledItem: Story = {
7189
render: (args) => (
7290
<Checkboxes {...args}>

stories/Form Elements/Radios.stories.tsx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,55 @@ export const RadiosWithHintsOnItems: Story = {
118118
),
119119
};
120120

121+
export const SmallRadios: Story = {
122+
args: {
123+
...StandardRadios.args,
124+
legendProps: { isPageHeading: true, size: 'm' },
125+
idPrefix: 'small',
126+
small: true,
127+
},
128+
render: StandardRadios.render,
129+
};
130+
131+
export const SmallInlineRadios: Story = {
132+
args: {
133+
...InlineRadios.args,
134+
legendProps: { isPageHeading: true, size: 'm' },
135+
small: true,
136+
},
137+
render: InlineRadios.render,
138+
};
139+
140+
export const SmallRadiosWithConditionalContent: Story = {
141+
args: {
142+
...RadiosWithConditionalContent.args,
143+
legendProps: { isPageHeading: true, size: 'm' },
144+
idPrefix: 'small-conditional',
145+
small: true,
146+
},
147+
render: RadiosWithConditionalContent.render,
148+
};
149+
150+
export const SmallRadiosWithADivider: Story = {
151+
args: {
152+
...RadiosWithADivider.args,
153+
legendProps: { isPageHeading: true, size: 'm' },
154+
idPrefix: 'small-divider',
155+
small: true,
156+
},
157+
render: RadiosWithADivider.render,
158+
};
159+
160+
export const SmallRadiosWithHintsOnItems: Story = {
161+
args: {
162+
...RadiosWithHintsOnItems.args,
163+
legendProps: { isPageHeading: true, size: 'm' },
164+
idPrefix: 'small-hints',
165+
small: true,
166+
},
167+
render: RadiosWithHintsOnItems.render,
168+
};
169+
121170
export const DisabledRadios: Story = {
122171
args: {
123172
idPrefix: 'disabled',

0 commit comments

Comments
 (0)