UNPKG

@retailmenot/anchor

Version:

A React UI Library by RetailMeNot

21 lines (20 loc) 789 B
import * as React from 'react'; import { SpaceProps } from '@xstyled/system'; export declare enum AlertTypes { success = "SUCCESS", info = "INFO", warning = "WARNING", error = "ERROR" } declare type AlertType = 'success' | 'info' | 'warning' | 'error' | AlertTypes.success | AlertTypes.info | AlertTypes.warning | AlertTypes.error; interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, SpaceProps { variant: AlertType; className?: string; message?: string; description?: string; closable?: boolean; icon?: JSX.Element; onClose?: (event?: Event) => void; } export declare const Alert: ({ className, children, onClose, message, description, closable, icon, ...props }: AlertProps) => React.ReactElement<AlertProps> | null; export {};