Skip to content

Commit c591e06

Browse files
authored
Merge pull request #482 from mashmatrix/support-slds-2-lookup
Update `Lookup` for SLDS2
2 parents 1e8a52d + d15c4ec commit c591e06

File tree

6 files changed

+1145
-602
lines changed

6 files changed

+1145
-602
lines changed

src/scripts/Icon.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export type IconCategory =
153153
| 'doctype'
154154
| 'standard'
155155
| 'utility';
156-
export type IconSize = 'x-small' | 'small' | 'medium' | 'large';
156+
export type IconSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large';
157157
export type IconContainer = boolean | 'default' | 'circle';
158158
export type IconTextColor = 'default' | 'warning' | 'error' | null;
159159

@@ -202,7 +202,9 @@ const SvgIcon = forwardRef(
202202
'react-slds-icon',
203203
{
204204
'slds-icon': !/slds-button__icon/.test(className),
205-
[`slds-icon_${size}`]: /^(x-small|small|medium|large)$/.test(size),
205+
[`slds-icon_${size}`]: /^(xx-small|x-small|small|medium|large)$/.test(
206+
size
207+
),
206208
[`slds-icon-text-${textColor ?? 'default'}`]:
207209
/^(default|warning|error)$/.test(textColor ?? '') && !iconColor,
208210
[`slds-icon-${iconColor ?? ''}`]: !container && iconColor,

0 commit comments

Comments
 (0)