UNPKG

727 BTypeScriptView Raw
1/// <reference types="react" />
2
3import * as React from 'react';
4import CommonProps from '../util';
5
6export interface BadgeProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
7 /**
8 * 徽章依托的内容
9 */
10 children?: React.ReactNode;
11
12 /**
13 * 展示的数字,大于 overflowCount 时显示为 ${overflowCount}+,为 0 时隐藏
14 */
15 count?: number | string;
16
17 /**
18 * 自定义节点内容
19 */
20 content?: React.ReactNode;
21
22 /**
23 * 展示的封顶的数字
24 */
25 overflowCount?: number | string;
26
27 /**
28 * 不展示数字,只展示一个小红点
29 */
30 dot?: boolean;
31}
32
33export default class Badge extends React.Component<BadgeProps, any> {}