@cimpress/react-components
Version:
React components to support the MCP styleguide
36 lines • 1.08 kB
TypeScript
import { ReactNode } from 'react';
import { PublicComponentProps } from './types';
type Status = 'danger' | 'info' | 'success' | 'warning';
export interface AlertStatelessProps extends PublicComponentProps {
/**
* Controls whether or not the close button on the right is shown.
*/
dismissible?: boolean;
/**
* Message for the alert.
*/
message: ReactNode;
/**
* A function to be called when the alert is closed.
*/
onDismiss?: (e: any) => void;
/**
* Defines the alert style.
*/
status?: Status;
/**
* Title for the alert. If no title is provided, the alert will not render a title section.
*/
title?: ReactNode;
}
export interface AlertProps extends PublicComponentProps, AlertStatelessProps {
/**
* Controls whether or not the alert is dismissed.
*
* @deprecated Use conditional rendering and `onDismiss` instead.
*/
dismissed?: boolean;
}
export declare const Alert: (props: AlertProps) => JSX.Element | null;
export {};
//# sourceMappingURL=Alert.d.ts.map