UNPKG

@metamask/design-system-react

Version:
38 lines 1.25 kB
import type { SVGProps, ComponentPropsWithoutRef } from "react"; import type { IconName, IconSize, IconColor } from "../../types/index.cjs"; type SVGElementProps = ComponentPropsWithoutRef<'svg'>; export type IconProps = SVGProps<SVGElementProps> & { /** * Required prop to specify which icon to render from the icon set */ name: IconName; /** * Optional prop to control the size of the icon * Different sizes map to specific pixel dimensions * * @default IconSize.Md */ size?: IconSize; /** * Optional prop that sets the color of the icon using predefined theme colors * * @default IconColor.IconDefault */ color?: IconColor; /** * Additional CSS classes to be added to the component. * These classes will be merged with the component's default classes using twMerge. */ className?: string; /** * Optional CSS styles to be applied to the component. * Should be used sparingly and only for dynamic styles that can't be achieved with className. */ style?: React.CSSProperties; /** * Optional prop to add a test id to the icon */ 'data-testid'?: string; }; export {}; //# sourceMappingURL=Icon.types.d.cts.map