import { ReactNode } from 'react'; import { AlertProps as MUIAlertProps } from '@mui/material/Alert'; import { BaseComponentProps } from '../../types'; import { ButtonProps } from '../Button/Button.types'; /** * Alert severity levels that determine the visual style and icon */ export type AlertSeverity = 'success' | 'info' | 'warning' | 'error'; export interface AlertProps extends Omit, Omit { /** * The severity level of the alert which determines its color scheme and icon. * - 'success': Green theme with checkmark icon - use for successful operations * - 'info': Blue theme with info icon - use for informational messages * - 'warning': Yellow/Orange theme with warning icon - use for potential issues * - 'error': Red theme with error icon - use for errors and failures * @example * * */ severity: AlertSeverity; /** * The main title text of the alert. * If not provided, the severity value is displayed as the title. * @example * */ title?: string; /** * Additional description text displayed below the title. * Use this for providing more context or details about the alert. * @example * */ description?: string; /** * Text label for the action button. * The button will only appear if both `actionName` and `onAction` are provided. * @example * handleUpdate()} * /> */ actionName?: string; /** * Callback function triggered when the action button is clicked. * The action button will only appear if both `actionName` and `onAction` are provided. * @example * extendSession()} * /> */ onAction?: () => void; /** * Callback function triggered when the close button is clicked. * If provided, a close button will be displayed in the alert. * @example * setShowAlert(false)} * /> */ onClose?: () => void; /** * Additional props to pass to the action Button component. * Useful for customizing the action button's appearance. * @example * */ actionButtonProps?: Partial; /** * Custom content to display inside the alert. * When provided, this will be rendered in addition to the description. */ children?: ReactNode; /** * When true, displays the alert with a subtle background style (no shadow and border). * Useful for inline alerts that don't need to stand out as much. * @default false * @example * */ subtleBackground?: boolean; } //# sourceMappingURL=Alert.types.d.ts.map