fix(SW-2101): Avoid underline on icons
Approved-by: Linus Flood
This commit is contained in:
@@ -20,5 +20,10 @@ export function MaterialIcon({
|
|||||||
...props
|
...props
|
||||||
}: MaterialIconProps) {
|
}: MaterialIconProps) {
|
||||||
const classNames = iconVariants({ className, color })
|
const classNames = iconVariants({ className, color })
|
||||||
return <MaterialSymbol className={classNames} {...props} fill={isFilled} />
|
return (
|
||||||
|
// The span is used to prevent the MaterialSymbol from being underlined when used inside a link or button
|
||||||
|
<span>
|
||||||
|
<MaterialSymbol className={classNames} {...props} fill={isFilled} />
|
||||||
|
</span>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
.icon {
|
.icon {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Icon */
|
/* Icon */
|
||||||
|
|||||||
Reference in New Issue
Block a user