editor.js/src/components/utils/notifier.ts
Taly 472d950b0b
refactoring: notifier is util now (#1628)
* Notifier is util now

* Update CHANGELOG.md

* Update notifier.ts

* Update cypress.yml

* Revert "Update cypress.yml"

This reverts commit a2c8331314.

* Update CHANGELOG.md
2021-04-15 20:20:21 +03:00

21 lines
577 B
TypeScript

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