UNPKG

@patreon/studio

Version:

Patreon Studio Design System

18 lines (17 loc) 734 B
import type { FloatingAccessoryProps } from '~/components/FloatingAccessory/types'; export type BadgeProps = Partial<Pick<FloatingAccessoryProps, 'shape' | 'position' | 'offset'>> & { /** variant of the badge */ variant?: 'primary' | 'secondary'; /** style of the badge */ style?: 'dot' | 'text'; /** content of the badge, can be a string or a number */ badgeContent: string | number | undefined; /** maximum number of digits to display for number content */ maxDigits?: number; /** children to render */ children: React.ReactNode; }; export type StandaloneBadgeProps = Pick<BadgeProps, 'variant' | 'style' | 'maxDigits'> & { className?: string; content: BadgeProps['badgeContent']; };