mirror of
https://github.com/HoshinoSuzumi/rayine-ui.git
synced 2025-04-15 04:18:50 +08:00
21 lines
529 B
TypeScript
21 lines
529 B
TypeScript
export type MessageType = "success" | "warning" | "error" | "info";
|
|
|
|
export interface Message {
|
|
id: string;
|
|
content: string;
|
|
type: MessageType;
|
|
duration?: number;
|
|
}
|
|
|
|
export interface MessageApi {
|
|
info: (content: string, duration?: number) => void;
|
|
success: (content: string, duration?: number) => void;
|
|
warning: (content: string, duration?: number) => void;
|
|
error: (content: string, duration?: number) => void;
|
|
destroyAll: () => void;
|
|
}
|
|
|
|
export interface MessageProviderApi {
|
|
destroy: (id: string) => void;
|
|
}
|