UNPKG

1.01 kBTypeScriptView Raw
1import * as React from 'react';
2import type { PresetColorType, PresetStatusColorType } from '../_util/colors';
3import type { LiteralUnion } from '../_util/type';
4import Ribbon from './Ribbon';
5export type { ScrollNumberProps } from './ScrollNumber';
6interface CompoundedComponent extends React.FC<BadgeProps> {
7 Ribbon: typeof Ribbon;
8}
9export interface BadgeProps {
10 /** Number to show in badge */
11 count?: React.ReactNode;
12 showZero?: boolean;
13 /** Max count to show */
14 overflowCount?: number;
15 /** Whether to show red dot without number */
16 dot?: boolean;
17 style?: React.CSSProperties;
18 prefixCls?: string;
19 scrollNumberPrefixCls?: string;
20 className?: string;
21 status?: PresetStatusColorType;
22 color?: LiteralUnion<PresetColorType, string>;
23 text?: React.ReactNode;
24 size?: 'default' | 'small';
25 offset?: [number | string, number | string];
26 title?: string;
27 children?: React.ReactNode;
28}
29declare const Badge: CompoundedComponent;
30export default Badge;