@aimake/nanod
Version:
## 设计模式 NANO DESIGN 是面向于企业级中台化应用的解决方案。服务于 ToB 和 ToE 类型的单页应用,应用于各产品中从而产出了一套设计及前端规范。
32 lines (31 loc) • 932 B
TypeScript
import * as React from 'react';
import CheckableTag from './CheckableTag';
export { CheckableTagProps } from './CheckableTag';
export interface TagProps {
prefixCls?: string;
className?: string;
color?: string;
/** 标签是否可以关闭 */
closable?: boolean;
/** 关闭时的回调 */
onClose?: Function;
/** 动画关闭后的回调 */
afterClose?: Function;
style?: React.CSSProperties;
}
export interface TagState {
closing: boolean;
closed: boolean;
}
export default class Tag extends React.Component<TagProps, TagState> {
static CheckableTag: typeof CheckableTag;
static defaultProps: {
prefixCls: string;
closable: boolean;
};
constructor(props: TagProps);
close: (e: React.MouseEvent<HTMLElement>) => void;
animationEnd: (_: string, existed: boolean) => void;
isPresetColor(color?: string): boolean;
render(): JSX.Element;
}