mirror of
https://github.com/codex-team/editor.js
synced 2024-06-01 13:32:43 +02:00
b223d63c59
This reverts commit 78775703c9
.
27 lines
703 B
TypeScript
27 lines
703 B
TypeScript
import Module from '../../__module';
|
|
import { Notifier } from '../../../../types/api';
|
|
import { ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions } from 'codex-notifier';
|
|
|
|
/**
|
|
*
|
|
*/
|
|
export default class NotifierAPI extends Module {
|
|
/**
|
|
* Available methods
|
|
*/
|
|
public get methods(): Notifier {
|
|
return {
|
|
show: (options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions): void => this.show(options),
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Show notification
|
|
*
|
|
* @param {NotifierOptions} options - message option
|
|
*/
|
|
public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions): void {
|
|
return this.Editor.Notifier.show(options);
|
|
}
|
|
}
|