UNPKG

@massds/mayflower-react

Version:

React versions of Mayflower design system UI components

37 lines (36 loc) 1.55 kB
import { ButtonAlertProps } from '../ButtonAlert'; import { EmergencyHeaderProps } from '../EmergencyHeader'; export interface EmergencyAlertsProps { /** The data-id of the organism */ id: string | number; /** A string that controls different color themes for the component. */ theme?: "c-warning" | "c-primary-alt" | "c-primary" | "c-gray" | "c-error"; /** An on button alert click callback function */ onButtonAlertClick?(...args: unknown[]): unknown; /** An on button close click callback function */ onButtonCloseClick?(...args: unknown[]): unknown; /** The emergency header props */ emergencyHeader?: EmergencyHeaderProps; /** The props for the button alert */ buttonAlert?: ButtonAlertProps; /** An array of alert messages: <br /> * `message:` A message describing the event.<br /> * `timeStamp:` A string representing the time of the event.<br /> * `link:` An optional function whose return value is a link to take the user to page with more information. */ alerts?: { message: string; timeStamp?: string; link?(...args: unknown[]): unknown; }[]; /** Whether or not to render a close button if not alerts are provided */ buttonClose?: boolean; } declare const EmergencyAlerts: { ({ id, emergencyHeader, buttonAlert, alerts, theme, buttonClose, onButtonAlertClick, onButtonCloseClick }: EmergencyAlertsProps): any; defaultProps: { theme: string; buttonClose: boolean; }; }; export default EmergencyAlerts;