Merged in fix/icons (pull request #3468)
feat(SW-3695): more icons fixes... * feat(SW-3695): more icons fixes...
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
.iconWrapper {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { HTMLAttributes } from "react"
|
||||
import { MaterialIconName, materialIcons } from "./generated"
|
||||
import { VariantProps } from "class-variance-authority"
|
||||
import { iconVariants } from "../variants"
|
||||
import styles from "./index.module.css"
|
||||
|
||||
export interface MaterialIconProps
|
||||
extends
|
||||
@@ -51,7 +52,12 @@ export function MaterialIcon({
|
||||
const iconClassName = iconVariants({ color })
|
||||
|
||||
return (
|
||||
<span data-testid="MaterialIcon" data-icon-name={icon} {...props}>
|
||||
<span
|
||||
data-testid="MaterialIcon"
|
||||
data-icon-name={icon}
|
||||
className={`${styles.iconWrapper}`}
|
||||
{...props}
|
||||
>
|
||||
<IconComponent
|
||||
width={size}
|
||||
height={size}
|
||||
|
||||
Reference in New Issue
Block a user