@blinkk/editor
Version:
Structured content editor with live previews.
40 lines (39 loc) • 1.33 kB
TypeScript
import { EditorNotification } from '../parts/notifications';
import { TemplateResult } from '@blinkk/selective-edit';
import { BaseUI } from '.';
import { LiveEditor } from '../editor';
export interface ToastConfig {
classes?: Array<string>;
notification: EditorNotification;
noAutoClose?: boolean;
noPauseOnFocusLoss?: boolean;
noPauseOnHover?: boolean;
}
declare const Toast_base: {
new (...args: any[]): {
_listeners?: Record<string, ((...args: any) => void)[]> | undefined;
addListener(eventName: string, callback: (...args: any) => void): void;
readonly listeners: Record<string, ((...args: any) => void)[]>;
triggerListener(eventName: string, ...args: any): void;
};
} & (new (...args: any[]) => {
_uuid?: string | undefined;
readonly uuid: string;
readonly uid: string;
}) & typeof BaseUI;
export declare class Toast extends Toast_base {
config: ToastConfig;
element?: HTMLElement;
isClosed: boolean;
isPaused: boolean;
isVisible: boolean;
constructor(config: ToastConfig);
classesForToast(): Record<string, boolean>;
handleToastClick(evt: Event): void;
handleAnimationStart(evt: Event): void;
hide(): void;
show(): void;
template(editor: LiveEditor): TemplateResult;
toggle(): void;
}
export {};