@metamask/design-system-react-native
Version:
1 lines • 1.11 kB
Source Map (JSON)
{"version":3,"file":"Icon.types.cjs","sourceRoot":"","sources":["../../../src/components/Icon/Icon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { SvgProps } from 'react-native-svg';\n\nimport type { IconColor, IconName, IconSize } from '../../types';\n\n/**\n * Icon component props.\n */\nexport type IconProps = {\n /**\n * Required prop to specify which icon to render from the icon set\n */\n name: IconName;\n /**\n * Optional prop to control the size of the icon\n * Different sizes map to specific pixel dimensions\n *\n * @default IconSize.Md\n */\n size?: IconSize;\n /**\n * Optional prop that sets the color of the icon using predefined theme colors\n *\n * @default IconColor.IconDefault\n */\n color?: IconColor;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & ViewProps;\n\n/**\n * Asset stored by icon name\n */\nexport type AssetByIconName = {\n [key in IconName]: React.FC<SvgProps & { name: string }>;\n};\n"]}