@appbuckets/react-ui-smart-components
Version:
UI Extended Components that work with @appbuckets/react-client and @appbuckets/react-ui
31 lines (30 loc) • 1.19 kB
TypeScript
import * as React from 'react';
import type { RaiseParam } from 'butter-toast';
import type { ToastProps } from '@appbuckets/react-ui/Toast';
import type {
NotificationContent,
INotificationManager,
} from './NotificationManager.types';
export default class NotificationManager implements INotificationManager {
namespace: string;
Component: React.ComponentType<ToastProps>;
defaultProps: Partial<ToastProps> | undefined;
constructor(
namespace: string,
Component: React.ComponentType<ToastProps>,
defaultProps?: Partial<ToastProps>
);
private show;
custom: (
content: NotificationContent,
options?: RaiseParam,
props?: Partial<ToastProps>
) => void;
default: (props: NotificationContent, options?: RaiseParam) => void;
error: (props: NotificationContent, options?: RaiseParam) => void;
info: (props: NotificationContent, options?: RaiseParam) => void;
primary: (props: NotificationContent, options?: RaiseParam) => void;
secondary: (props: NotificationContent, options?: RaiseParam) => void;
success: (props: NotificationContent, options?: RaiseParam) => void;
warning: (props: NotificationContent, options?: RaiseParam) => void;
}