@voiceiq/web-components
Version:
VoiceIQ Web Component library
49 lines (48 loc) • 1.64 kB
TypeScript
import React from 'react';
/**
* Snackbar service
* Handles all snackbar related logic
* Uses notistack to enqueue snackbars and handle snackbar states
*
* @type {SnackbarService}
*/
declare class SnackbarService {
/**
* PRIVATE
* Not intended to be used beyond the @voiceiq/web-components score
*/
ref: React.RefObject<unknown>;
multilineRef: React.RefObject<unknown>;
/**
* Sends a snackbar
*
* @param {ReactNode} message Message of the snackbar
* @param {bool} persist Should the snackbar persist
* @param {string} key Unique identifier of the snackbar
* @param {string} timeout Auto hide duration
*/
sendInline: (content: React.ReactNode, persist: boolean, key: string, timeout: number, onExited: any, action: any) => void;
/**
* Sends a multiline snackbar
*
* @param {ReactNode} message Message of the snackbar
* @param {bool} persist Should the snackbar persist
* @param {string} key Unique identifier of the snackbar
* @param {number} timeout Auto hide duration
*/
sendMultiline: (content: React.ReactNode, persist: boolean, key: string, timeout: number, onExited: any, action: any) => void;
/**
* Dismisses the snackbar
*
* @param {string} key Snackbar key
*/
dismissInline: (key: string) => any;
/**
* Dismisses the snackbar
*
* @param {string} key Snackbar key
*/
dismissMultiline: (key: string) => any;
}
declare const _default: SnackbarService;
export default _default;