@meta2d/core
Version:
@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .
31 lines (30 loc) • 773 B
TypeScript
export type Theme = 'success' | 'info' | 'warning' | 'error' | 'question';
export interface MessageOptions {
id?: string;
content?: string;
theme?: Theme;
placement?: string;
duration?: number;
closeBtn?: boolean;
height?: number;
}
export declare const messageList: {
[key: string]: Message;
};
export declare class Message {
parentElement: HTMLElement;
box: HTMLElement;
icon: HTMLElement;
text: HTMLElement;
closeBtn: HTMLElement;
duration: number;
content: string;
theme: Theme;
placement: string;
height: number;
id: string;
constructor(parentElement: HTMLElement, options: MessageOptions);
init(): void;
setPosition(placement: string, index?: number): void;
close(): void;
}