@metamask/design-system-react-native
Version:
1 lines • 1.66 kB
Source Map (JSON)
{"version":3,"file":"ButtonIcon.types.mjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonIconSize } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { ButtonAnimatedProps } from '../temp-components/ButtonAnimated';\n\n/**\n * ButtonIcon component props.\n */\nexport type ButtonIconProps = {\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?: ButtonIconSize;\n /**\n * Optional prop to specify an icon to show\n */\n iconName: IconName;\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Partial<IconProps>;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.\n *\n * @default false\n */\n isInverse?: boolean;\n /**\n * Optional prop to show the floating/contained state of the button, which is reserved for floating buttons.\n * Note: This prop provides styling only. There is no positioning logic.\n *\n * @default false\n */\n isFloating?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & Omit<ButtonAnimatedProps, 'children'>;\n"]}