pocko-ui
Version:
React components using pure Bootstrap 5+ which does not contain any external style and script libraries.
30 lines (29 loc) • 910 B
TypeScript
import React from "react";
import "./Index.scss";
/** 单条通知对象 */
export interface Notice {
message: string;
description?: string;
duration?: number;
}
/** Notification 组件 Props */
export interface NotificationProps {
wrapperContentClassName?: string;
wrapperContentMessageClassName?: string;
wrapperContentDescriptionClassName?: string;
wrapperContentCloseInconClassName?: string;
closeIcon?: React.ReactNode;
onOpen?: () => void;
onClose?: () => void;
width?: number | string;
top?: number;
zIndex?: number;
isDraggable?: boolean;
}
/** Notification 组件 ref 暴露方法 */
export interface NoticeRef {
open: (notice: Notice) => void;
close: () => void;
}
declare const Notification: React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<NoticeRef>>;
export default Notification;