Skip to content

Commit 551ab69

Browse files
jawinnpfulton
authored andcommitted
docs(textfield): use correct icon set for valid icon in storybook
Define the icon set used for the valid and invalid icons in Textfield. This necessary story update was related to recent fixes to icon that addressed the fact that icons with the same name exist in both icon sets. This one wasn't caught in VRTs because Textfield does not have a kitchen sink style story yet to represent all of its states.
1 parent ce1087c commit 551ab69

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

components/textfield/stories/template.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const Template = ({
3333
labelPosition = "top",
3434
labelText,
3535
iconName,
36+
iconSet,
3637
pattern,
3738
placeholder,
3839
name,
@@ -54,8 +55,13 @@ export const Template = ({
5455
console.warn(e);
5556
}
5657

57-
if (isInvalid) iconName = "Alert";
58-
else if (isValid) iconName = "Checkmark";
58+
if (isInvalid) {
59+
iconName = "Alert";
60+
iconSet = "workflow";
61+
} else if (isValid) {
62+
iconName = "Checkmark";
63+
iconSet = "ui";
64+
}
5965

6066
return html`
6167
<div
@@ -101,6 +107,7 @@ export const Template = ({
101107
...globals,
102108
size,
103109
iconName,
110+
setName: iconSet,
104111
customClasses: [
105112
!!(isInvalid || isValid)
106113
? `${rootClass}-validationIcon`

0 commit comments

Comments
 (0)