UNPKG

@metamask/design-system-react-native

Version:
1 lines 1.19 kB
{"version":3,"file":"BadgeCount.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ViewProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { BadgeCountSize } from '../../types';\nimport type { TextProps } from '../Text';\n\n/**\n * BadgeCount component props.\n */\nexport type BadgeCountProps = {\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 to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & Omit<ViewProps, 'children'>;\n"]}