import { MaterialSymbol, type MaterialSymbolProps } from './MaterialSymbol' import { iconVariants } from '../variants' import type { VariantProps } from 'class-variance-authority' import { HTMLAttributes } from 'react' export interface MaterialIconProps extends Pick, Omit, 'color' | 'id'>, VariantProps { isFilled?: boolean } export type MaterialIconSetIconProps = Omit export function MaterialIcon({ color, size = 24, className, isFilled = false, ...props }: MaterialIconProps) { const classNames = iconVariants({ className, color }) const { role, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden } = props // Automatically decide whether to hide from assistive tech const computedAriaHidden = ariaHidden !== undefined ? ariaHidden : ariaLabel || role ? false : true return ( // The span is used to prevent the MaterialSymbol from being underlined when used inside a link or button ) }