UNPKG

@metamask/design-system-react

Version:
1 lines 1.39 kB
{"version":3,"file":"BadgeCount.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport type { BadgeCountSize } from '../../types';\nimport type { TextProps } from '../Text';\n\n/**\n * BadgeCount component props.\n */\nexport type BadgeCountProps = ComponentProps<'div'> & {\n /**\n * Optional prop to control the size of the BadgeCount\n * Different sizes map to specific height\n *\n * @default IconSize.Md\n */\n size?: BadgeCountSize;\n /**\n * Required prop to show the count number\n */\n count: number;\n /**\n * Optional prop to determine the max the count can go up to.\n * If count > max, the count will be shown as \"max+\"\n *\n * @default 99\n */\n max?: number;\n /**\n * Optional props to be passed to the Text component used by count\n */\n textProps?: Partial<TextProps>;\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeCount component.\n * These classes will be merged with the component's default classes using twMerge.\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"]}