UNPKG

zent

Version:

一套前端设计语言和基于React的实现

40 lines (39 loc) 1.09 kB
import { PureComponent, ReactNode } from 'react'; import { AlertTypes } from './types'; interface IAlertRenderProps { type?: AlertTypes; loading?: boolean; outline?: boolean; bordered?: boolean; title?: React.ReactNode; description?: React.ReactNode; extraContent?: React.ReactNode; closable?: boolean; closed?: boolean; icon?: ReactNode; closeIconColor?: string; progress?: number; onClose?: () => void; closeContent?: React.ReactNode; } export interface IAlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, IAlertRenderProps { } interface IAlertState { closed: boolean; } export declare class Alert extends PureComponent<IAlertProps, IAlertState> { static highlightClassName: string; static defaultProps: { type: string; bordered: boolean; loading: boolean; outline: boolean; closable: boolean; }; state: IAlertState; private get isControlled(); private get closed(); private onCloseHandler; render(): JSX.Element; } export default Alert;