react-lightning-design-system
Version:
Salesforce Lightning Design System components built with React
21 lines (20 loc) • 915 B
TypeScript
import { MouseEvent, HTMLAttributes, EventHandler, FC } from 'react';
import { IconSize } from './Icon';
declare const NOTIFICATION_TYPES: readonly ["alert", "toast"];
declare const NOTIFICATION_LEVELS: readonly ["info", "success", "warning", "error"];
export type NotificationType = (typeof NOTIFICATION_TYPES)[number];
export type NotificationLevel = (typeof NOTIFICATION_LEVELS)[number];
export type NotificationProps = {
type?: NotificationType;
level?: NotificationLevel;
alt?: string;
icon?: string;
iconSize?: IconSize;
onClose?: EventHandler<MouseEvent<HTMLButtonElement>>;
} & HTMLAttributes<HTMLDivElement>;
export declare const Notification: FC<NotificationProps>;
export type AlertProps = Omit<NotificationProps, 'type'>;
export declare const Alert: FC<AlertProps>;
export type ToastProps = Omit<NotificationProps, 'type'>;
export declare const Toast: FC<ToastProps>;
export {};