fix(SW-2101): Avoid underline on icons

Approved-by: Linus Flood
This commit is contained in:
Erik Tiekstra
2025-04-07 10:38:00 +00:00
parent 39059eb8b2
commit 8d34e1c8bb
2 changed files with 7 additions and 1 deletions

View File

@@ -20,5 +20,10 @@ export function MaterialIcon({
...props
}: MaterialIconProps) {
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>
)
}

View File

@@ -1,5 +1,6 @@
.icon {
margin: 0;
vertical-align: middle;
}
/* Icon */