UNPKG

@voiceiq/web-components

Version:

VoiceIQ Web Component library

24 lines (23 loc) 830 B
import BaseSnackbar, { CallbackFunction } from './Snackbar.base'; declare class DefaultSnackbar { _snackBase: BaseSnackbar; content: string | null; persist: boolean; key: any; timeout: number; onCommit: CallbackFunction; onCancel: CallbackFunction; constructor(content: string, persist?: boolean, key?: string, timeout?: number); /** * Dispatch a Snackbar to the Notification tray * * @param {Func} onCommit What to do when the action is to be committed (Optional) * @param {Func} onCancel What to do when the action is to be cancelled (Optional) */ dispatch: (onCommit?: CallbackFunction, onCancel?: CallbackFunction) => void; /** * Dismisses the snackbar instance */ dismisss: () => any; } export default DefaultSnackbar;