Skip to content

Commit db2f097

Browse files
committed
fix inverse icon color rendering
1 parent 63e30a0 commit db2f097

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/scripts/Icon.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ const SvgIcon = forwardRef(
204204
'slds-icon': !/slds-button__icon/.test(className),
205205
[`slds-icon_${size}`]: /^(x-small|small|medium|large)$/.test(size),
206206
[`slds-icon-text-${textColor ?? 'default'}`]:
207-
/^(default|warning|error)$/.test(textColor ?? 'default') &&
208-
!iconColor,
207+
/^(default|warning|error)$/.test(textColor ?? '') && !iconColor,
209208
[`slds-icon-${iconColor ?? ''}`]: !container && iconColor,
210209
'slds-m-left_x-small': align === 'right',
211210
'slds-m-right_x-small': align === 'left',

stories/Button.stories.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,18 +286,16 @@ export const ButtonIconInverse: ComponentStoryObj<typeof Button> = {
286286
/**
287287
*
288288
*/
289-
export const ButtonIconInverseInDarkBackground: ComponentStoryObj<
290-
typeof Button
291-
> = {
292-
name: 'Button Icon Inverse in dark background',
289+
export const ButtonIconInverseDisabled: ComponentStoryObj<typeof Button> = {
290+
name: 'Button Icon Inverse - Disabled',
293291
args: {
294292
type: 'icon-inverse',
295293
icon: 'close',
296294
disabled: true,
297295
},
298296
parameters: {
299297
docs: {
300-
storyDescription: 'Button with icon in dark background',
298+
storyDescription: 'Button with icon in dark background, disabled',
301299
},
302300
},
303301
};

0 commit comments

Comments
 (0)