ukelli-ui
Version:
Base on React's UI lib. Make frontend's dev simpler and faster.
35 lines (34 loc) • 921 B
TypeScript
import { PureComponent } from 'react';
export interface AlertProps {
/** panel 的 title */
title?: string;
/** panel 的一项内容 */
text?: any;
/** panel 的类型 */
type?: 'warn' | 'error' | 'success' | 'normal';
/** 是否默认显示内容 */
defaultShow?: boolean;
/** 数据数据,任意类型,渲染出来带有序号 */
texts?: any[];
/** 是否需要内容收起展开的开关 */
needToolTip?: boolean;
/** 是否可收缩内容 */
collapse?: boolean;
}
export default class Alert extends PureComponent<AlertProps, {
showContent: boolean;
}> {
static defaultProps: {
type: string;
needToolTip: boolean;
defaultShow: boolean;
collapse: boolean;
title: string;
text: string;
};
state: {
showContent: boolean;
};
toggleContent: () => void;
render(): JSX.Element;
}