UNPKG

@metamask/design-system-react

Version:
1 lines 1.56 kB
{"version":3,"file":"ButtonIcon.types.cjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport type { ButtonIconSize } from '../../types';\nimport type { IconName, IconProps } from '../Icon';\n\nexport type ButtonIconProps = ComponentProps<'button'> & {\n /**\n * Required prop to specify the icon to show\n */\n iconName: IconName;\n /**\n * Required prop to provide an accessible label for the button\n */\n ariaLabel: string;\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 that when true, applies inverse styling to the button\n *\n * @default false\n */\n isInverse?: boolean;\n /**\n * Optional prop that when true, applies floating/contained styling to the button\n *\n * @default false\n */\n isFloating?: boolean;\n /**\n * Optional prop to control the size of the button\n *\n * @default ButtonIconSize.Md\n */\n size?: ButtonIconSize;\n /**\n * Optional prop for additional CSS classes to be applied to the ButtonIcon component\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n};\n"]}