editor.js/src/components/modules/notifier.ts
George Berezhnoy 4c0d806a12
[Refactor] ESLint fixed (#1100)
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2020-04-18 21:55:19 +03:00

23 lines
612 B
TypeScript

import Module from '../__module';
/**
* Use external package module for notifications
*
* @see https://github.com/codex-team/js-notifier
*/
import notifier, { ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions } from 'codex-notifier';
/**
* Notifier module
*/
export default class Notifier extends Module {
/**
* Show web notification
*
* @param {NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions} options - notification options
*/
public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions): void {
notifier.show(options);
}
}