sailboat-design
Version:
A simple sailboat simulator
38 lines (37 loc) • 1.14 kB
TypeScript
/// <reference types="react" />
export declare enum AlertType {
Success = "success",
Danger = "danger",
Warning = "warning",
Default = "default"
}
export interface AlertProps {
className?: string;
type?: AlertType;
title: string | React.ReactElement;
description?: string | React.ReactElement;
showCloseIcon?: boolean;
open: boolean;
autoHideDuration?: number;
onClose: () => void;
}
/**
* 一个警告提示组件展示了一段简短且重要的信息,在不影响用户操作的同时能够吸引用户的注意力。
* ### 引用方法
* ~~~js
* import { Alert } from '@sailboat';
* ~~~
* * 警告提示有四种不同程度的级别,每种都有自己独特的颜色。
* * title, description 可以是一个 React.ReactElement,也可以是一个字符串。
*/
export declare const Alert: {
(props: AlertProps): JSX.Element;
defaultProps: {
type: AlertType;
showCloseIcon: boolean;
description: string;
autoHideDuration: number;
onClose: () => void;
};
};
export default Alert;