UNPKG

@metamask/design-system-react-native

Version:
39 lines 1.03 kB
import type React from "react"; import type { ViewProps } from "react-native/index.js"; import type { SvgProps } from "react-native-svg"; import type { IconColor, IconName, IconSize } from "../../types/index.mjs"; /** * Icon component props. */ export type IconProps = { /** * 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; /** * Optional prop to add twrnc overriding classNames. */ twClassName?: string; } & ViewProps; /** * Asset stored by icon name */ export type AssetByIconName = { [key in IconName]: React.FC<SvgProps & { name: string; }>; }; //# sourceMappingURL=Icon.types.d.mts.map