UNPKG

@cainiaofe/cn-ui-m

Version:
63 lines (62 loc) 1.33 kB
import * as React from 'react'; import { BasicComponentProps } from "../../../types"; export interface CnMessageProps extends Omit<BasicComponentProps, 'title'> { /** * 类型 * @default 'notice' */ type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading'; /** * 形状 * @default 'inline' */ shape?: 'inline' | 'toast'; /** * 标题 */ title?: React.ReactNode; /** * 是否显示 */ visible?: boolean; /** * 默认显示 * @default true */ defaultVisible?: boolean; /** *icon 类型, 会显示内部设置的iconType */ iconType?: string | null | false; /** * 显示关闭按钮 * @default false */ closeable?: boolean; /** * 显示背景,只在func的调用模式下起效 * @default type==='loading' */ showMask?: boolean; /** * 内容 */ children?: string; /** * 指定 message 层级 */ zIndex?: number; /** * 展示形式 multiple多行平铺,beyond最多展示3行,超出... * @default 'beyond' */ showType?: 'multiple' | 'beyond'; /** * 关闭回调 */ onClose?: () => void; /** * 点击触发的回调函数 */ onClick?: () => void; }