Skip to content

Commit f57f21b

Browse files
(Icon): unify the label into the title
1 parent 9bef3e3 commit f57f21b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/scripts/Icon.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ export type IconTextColor =
162162
*
163163
*/
164164
export type IconProps = {
165-
label?: string;
166165
containerClassName?: string;
167166
category?: IconCategory;
168167
icon: string;
@@ -243,7 +242,6 @@ export const Icon = createFC<IconProps, { ICONS: typeof ICONS }>(
243242
(props) => {
244243
const {
245244
container,
246-
label,
247245
containerClassName: containerClassName_,
248246
fillColor,
249247
textColor = 'default',
@@ -291,10 +289,8 @@ export const Icon = createFC<IconProps, { ICONS: typeof ICONS }>(
291289
}
292290
);
293291

294-
const iconTitle = title || label;
295-
296292
return (
297-
<span className={containerClassName} title={iconTitle}>
293+
<span className={containerClassName} title={title}>
298294
<SvgIcon
299295
ref={svgIconRefCallback}
300296
{...rprops}
@@ -304,7 +300,7 @@ export const Icon = createFC<IconProps, { ICONS: typeof ICONS }>(
304300
iconColor: fillIconColor,
305301
}}
306302
/>
307-
{label ? <span className='slds-assistive-text'>{label}</span> : null}
303+
{title ? <span className='slds-assistive-text'>{title}</span> : null}
308304
</span>
309305
);
310306
},

0 commit comments

Comments
 (0)