@@ -12,6 +12,7 @@ export interface MaterialIconProps
|
|||||||
size?: number
|
size?: number
|
||||||
styleName?: "outlined" | "rounded" | "sharp"
|
styleName?: "outlined" | "rounded" | "sharp"
|
||||||
isFilled?: boolean
|
isFilled?: boolean
|
||||||
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MaterialIconSetIconProps = Omit<MaterialIconProps, "icon">
|
export type MaterialIconSetIconProps = Omit<MaterialIconProps, "icon">
|
||||||
@@ -22,7 +23,8 @@ export function MaterialIcon({
|
|||||||
styleName = "outlined",
|
styleName = "outlined",
|
||||||
color = "CurrentColor",
|
color = "CurrentColor",
|
||||||
isFilled,
|
isFilled,
|
||||||
...props
|
className,
|
||||||
|
...rest
|
||||||
}: MaterialIconProps) {
|
}: MaterialIconProps) {
|
||||||
const iconStyles = materialIcons[icon]
|
const iconStyles = materialIcons[icon]
|
||||||
|
|
||||||
@@ -55,8 +57,8 @@ export function MaterialIcon({
|
|||||||
<span
|
<span
|
||||||
data-testid="MaterialIcon"
|
data-testid="MaterialIcon"
|
||||||
data-icon-name={icon}
|
data-icon-name={icon}
|
||||||
className={cx(styles.iconWrapper, props.className)}
|
className={cx(styles.iconWrapper, className)}
|
||||||
{...props}
|
{...rest}
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent
|
||||||
width={size}
|
width={size}
|
||||||
|
|||||||
Reference in New Issue
Block a user