UNPKG

@aliretail/react-materials-components

Version:
51 lines (50 loc) 1.24 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; declare enum ETypeToColor { 'warning' = "orange", 'middle' = "blue", 'success' = "green", 'cancel' = "gray", 'error' = "red" } export declare type TStatusTagProps = typeof StatusTag.defaultProps & { /** * 种类 * @default 'cancel' */ type: keyof typeof ETypeToColor; /** * tag内显示的文字 * @default 'tag' */ text: string; /** * tag预设颜色或背景颜色 * @default '' */ color?: string; /** * 标签大小 * @default 'small' */ size?: 'small' | 'medium' | 'large'; /** 实现标签组 */ list?: TStatusTagProps[]; }; declare class StatusTag extends React.Component<TStatusTagProps> { static propTypes: { type: PropTypes.Requireable<string>; text: PropTypes.Requireable<string>; color: PropTypes.Requireable<string>; size: PropTypes.Requireable<string>; }; static defaultProps: { type: string; text: string; size: string; }; static TypeToColor: typeof ETypeToColor; render(): JSX.Element; } export { StatusTag, ETypeToColor }; export default StatusTag;