UNPKG

@wix/design-system

Version:

@wix/design-system

57 lines (46 loc) 1.45 kB
import * as React from 'react'; import CloseButton from '../CloseButton'; import { EllipsisCommonProps } from '../common/Ellipsis'; export interface NotificationProps { children?: React.ReactNode; dataHook?: string; show?: boolean; theme?: NotificationSkin; skin?: NotificationSkin; type?: NotificationType; autoHideTimeout?: number; zIndex?: number; onClose?: (source: string) => void; } export type NotificationSkin = | 'standard' | 'error' | 'success' | 'warning' | 'premium'; export type NotificationTheme = NotificationSkin; export type NotificationType = 'local' | 'global' | 'sticky'; declare const TextLabel: React.FC<TextLabelProps>; declare const ActionButton: React.FC<ActionButtonProps>; declare const DEFAULT_TIMEOUT: number; interface TextLinkActionButton { children?: React.ReactNode; type: 'textLink'; onClick?: React.MouseEventHandler<HTMLAnchorElement>; link?: string; target?: string; } interface ButtonActionButtonProps { children?: React.ReactNode; type?: 'button'; onClick?: React.MouseEventHandler<HTMLButtonElement>; } type ActionButtonProps = ButtonActionButtonProps | TextLinkActionButton; type TextLabelProps = EllipsisCommonProps & { children: React.ReactNode; }; export default class Notification extends React.Component<NotificationProps> { static ActionButton: typeof ActionButton; static TextLabel: typeof TextLabel; static CloseButton: typeof CloseButton; }