biplab-notifier
Version:
This is a notification npm package, it can be use as simple notification or modal dialog, a lot of customization option are available as well, checkout the github repo and examples
53 lines (52 loc) • 1.58 kB
TypeScript
import { Message } from '../message/notifer';
import { NotifierTemplate } from '../template/notifier';
export interface NotificationButton {
type: 'button' | 'submit';
disabled: boolean;
css: Css;
text: string;
emitValue: any;
callBackFunctions?: {
func: Function;
param?: any;
}[];
}
export interface Css {
background?: string;
color?: string;
width?: string;
height?: string;
shadow?: boolean;
position?: 'top' | 'left' | 'bottom' | 'right' | 'center' | 'default';
}
interface Visibility {
status: 'show' | 'hide';
}
export declare class NotifcationLayout {
layout: MultiNotifier | SingleNotifier;
constructor(type?: MultiNotifier | SingleNotifier);
}
export declare class SingleNotifier {
closeButton: Visibility;
title: Visibility;
displayAs: 'dialog' | 'snack-bar' | 'notification';
disableOutsideClick: boolean;
constructor(closeButton?: Visibility, title?: Visibility, displayAs?: 'dialog' | 'snack-bar' | 'notification', disableOutsideClick?: boolean);
}
export declare class MultiNotifier extends SingleNotifier {
head: string;
actionRow: Visibility;
body: Visibility;
titleText?: string;
isDailog: boolean;
constructor(head?: string, actionRow?: Visibility, body?: Visibility, titleText?: string, isDailog?: boolean);
}
export interface NotificationHint {
template?: NotifierTemplate;
layout: SingleNotifier | MultiNotifier;
data: Message | Message[];
type: string;
css?: Css;
buttons?: NotificationButton[];
}
export {};