Skip to content

Commit a6cde0c

Browse files
committed
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 b13f976 commit a6cde0c

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
@@ -29,6 +29,7 @@ export const Template = ({
2929
isKeyboardFocused = false,
3030
isLoading = false,
3131
iconName,
32+
iconSet,
3233
pattern,
3334
placeholder,
3435
name,
@@ -50,8 +51,13 @@ export const Template = ({
5051
console.warn(e);
5152
}
5253

53-
if (isInvalid) iconName = "Alert";
54-
else if (isValid) iconName = "Checkmark";
54+
if (isInvalid) {
55+
iconName = "Alert";
56+
iconSet = "workflow";
57+
} else if (isValid) {
58+
iconName = "Checkmark";
59+
iconSet = "ui";
60+
}
5561

5662
return html`
5763
<div
@@ -90,6 +96,7 @@ export const Template = ({
9096
...globals,
9197
size,
9298
iconName,
99+
setName: iconSet,
93100
customClasses: [
94101
!!(isInvalid || isValid)
95102
? `${rootClass}-validationIcon`

0 commit comments

Comments
 (0)