UNPKG

846 BTypeScriptView Raw
1import * as React from 'react';
2import CheckableTag from './CheckableTag';
3import { PresetColorType, PresetStatusColorType } from '../_util/colors';
4import { LiteralUnion } from '../_util/type';
5export { CheckableTagProps } from './CheckableTag';
6export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
7 prefixCls?: string;
8 className?: string;
9 color?: LiteralUnion<PresetColorType | PresetStatusColorType, string>;
10 closable?: boolean;
11 closeIcon?: React.ReactNode;
12 visible?: boolean;
13 onClose?: (e: React.MouseEvent<HTMLElement>) => void;
14 style?: React.CSSProperties;
15 icon?: React.ReactNode;
16}
17export interface TagType extends React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLElement>> {
18 CheckableTag: typeof CheckableTag;
19}
20declare const Tag: TagType;
21export default Tag;