UNPKG

947 BTypeScriptView Raw
1export interface UseBadgeParameters {
2 /**
3 * The content rendered within the badge.
4 */
5 badgeContent?: React.ReactNode;
6 /**
7 * If `true`, the badge is invisible.
8 * @default false
9 */
10 invisible?: boolean;
11 /**
12 * Max count to show.
13 * @default 99
14 */
15 max?: number;
16 /**
17 * Controls whether the badge is hidden when `badgeContent` is zero.
18 * @default false
19 */
20 showZero?: boolean;
21}
22export interface UseBadgeReturnValue {
23 /**
24 * Defines the content that's displayed inside the badge.
25 */
26 badgeContent: React.ReactNode;
27 /**
28 * If `true`, the component will not be visible.
29 */
30 invisible: boolean;
31 /**
32 * Maximum number to be displayed in the badge.
33 */
34 max: number;
35 /**
36 * Value to be displayed in the badge. If `badgeContent` is greater than `max`, it will return `max+`.
37 */
38 displayValue: React.ReactNode;
39}