UNPKG

968 BTypeScriptView Raw
1import * as React from 'react';
2import Ribbon from './Ribbon';
3import { PresetColorType, PresetStatusColorType } from '../_util/colors';
4import { LiteralUnion } from '../_util/type';
5export { 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}
28declare const Badge: CompoundedComponent;
29export default Badge;