UNPKG

reapop

Version:

A simple & customizable notifications system for React

26 lines (25 loc) 833 B
import { POSITIONS, STATUSES } from '../../constants'; export interface NotificationButton { name: string; primary?: boolean; onClick?: (...args: unknown[]) => void; } export declare type Status = (typeof STATUSES)[keyof typeof STATUSES]; export declare type Position = (typeof POSITIONS)[keyof typeof POSITIONS]; export interface Notification { id: string; title?: string; message?: string; status: Status; position: Position; buttons: NotificationButton[]; image?: string; dismissAfter?: number; dismissible?: boolean; onAdd?: (...args: unknown[]) => void; onDismiss?: (...args: unknown[]) => void; showDismissButton?: boolean; allowHTML?: boolean; [index: string]: unknown; } export declare type NewNotification = Partial<Notification>;