yrd-ui
Version:
npx create-react-app --template typescript yrd-ui
25 lines (24 loc) • 669 B
TypeScript
import { FC } from 'react';
export type AlertType = 'success' | 'default' | 'danger' | 'warning';
export interface AlertProps {
/**标题 */
title: string;
/**描述 */
description?: string;
/**类型 四种可选 针对四种不同的场景 */
type?: AlertType;
/**关闭alert时触发的事件 */
onClose?: () => void;
/**是否显示关闭图标*/
closable?: boolean;
}
/**
* 用于页面中展示重要的提示信息。 点击右侧的叉提示自动消失
* ### 引用方法
*
* ~~~js
* import { Alert } from 'yrd-ui'
* ~~~
*/
export declare const Alert: FC<AlertProps>;
export default Alert;