UNPKG

@appbuckets/react-ui-smart-components

Version:

UI Extended Components that work with @appbuckets/react-client and @appbuckets/react-ui

40 lines (39 loc) 1.24 kB
import type { RaiseParam } from 'butter-toast'; import type { ValidationError } from 'yup'; import type { ToastProps } from '@appbuckets/react-ui/Toast'; import type { ClientRequestError } from '@appbuckets/react-app-client'; declare type StrictNotificationContent = | string | ToastProps | ClientRequestError; export declare type NotificationContent = | StrictNotificationContent | StrictNotificationContent[] | ValidationError; export declare type NotificationRaiser = ( content: NotificationContent, options?: RaiseParam ) => void; export interface INotificationManager { /** Show a custom style notification */ custom( content: NotificationContent, options?: RaiseParam, props?: Partial<ToastProps> ): void; /** Show a default style notification */ default: NotificationRaiser; /** Show an error notification */ error: NotificationRaiser; /** Show an info notification */ info: NotificationRaiser; /** Show a primary notification */ primary: NotificationRaiser; /** Show a secondary notification */ secondary: NotificationRaiser; /** Show a success notification */ success: NotificationRaiser; /** Show a warning notification */ warning: NotificationRaiser; } export {};