Skip to content

Commit 7afa5e1

Browse files
jawinnpfulton
authored andcommitted
docs(fieldlabel): add stories for required asterisk
Use isRequired field in stories, so the required asterisk is represented in VRTs. Along with wrapping label text.
1 parent d96cc23 commit 7afa5e1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

components/fieldlabel/stories/fieldlabel.stories.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,19 @@ RightAligned.args = {
8585
alignment: "right",
8686
style: { width: "72px" },
8787
};
88+
89+
export const Required = Template.bind({});
90+
Required.args = {
91+
label: "Label example",
92+
alignment: "left",
93+
isRequired: true,
94+
style: { width: "200px" },
95+
};
96+
97+
export const WrappingAndRequired = Template.bind({});
98+
WrappingAndRequired.args = {
99+
label: "Label example with longer text that will wrap to the next line. And with an asterisk that marks it as required.",
100+
alignment: "left",
101+
isRequired: true,
102+
style: { width: "200px" },
103+
};

0 commit comments

Comments
 (0)