UNPKG

@buun_group/brutalist-ui

Version:
82 lines (81 loc) 3.1 kB
/** * @module Alert * @description A component for displaying important messages to users. Supports different severity levels and optional dismiss functionality. */ import { HTMLAttributes, CSSProperties } from 'react'; export interface AlertProps extends HTMLAttributes<HTMLDivElement> { /** Type of alert */ type?: 'info' | 'success' | 'warning' | 'error'; /** Visual variant */ variant?: 'filled' | 'outline'; /** Size of the alert */ size?: 'sm' | 'md' | 'lg'; /** Whether the alert can be dismissed */ dismissible?: boolean; /** Callback when alert is dismissed */ onDismiss?: () => void; } export interface AlertIconProps extends HTMLAttributes<HTMLDivElement> { /** * Additional CSS classes to apply to the icon wrapper */ className?: string; /** * Custom inline styles (supports utility classes) */ style?: CSSProperties; } export interface AlertContentProps extends HTMLAttributes<HTMLDivElement> { /** * Additional CSS classes to apply to the content wrapper */ className?: string; /** * Custom inline styles (supports utility classes) */ style?: CSSProperties; } export interface AlertTitleProps extends HTMLAttributes<HTMLHeadingElement> { /** * Additional CSS classes to apply to the title */ className?: string; /** * Custom inline styles (supports utility classes) */ style?: CSSProperties; } export interface AlertDescriptionProps extends HTMLAttributes<HTMLParagraphElement> { /** * Additional CSS classes to apply to the description */ className?: string; /** * Custom inline styles (supports utility classes) */ style?: CSSProperties; } export interface AlertActionsProps extends HTMLAttributes<HTMLDivElement> { /** * Additional CSS classes to apply to the actions container */ className?: string; /** * Custom inline styles (supports utility classes) */ style?: CSSProperties; } declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<HTMLDivElement>>; declare const AlertIcon: import("react").ForwardRefExoticComponent<AlertIconProps & import("react").RefAttributes<HTMLDivElement>>; declare const AlertContent: import("react").ForwardRefExoticComponent<AlertContentProps & import("react").RefAttributes<HTMLDivElement>>; declare const AlertTitle: import("react").ForwardRefExoticComponent<AlertTitleProps & import("react").RefAttributes<HTMLHeadingElement>>; declare const AlertDescription: import("react").ForwardRefExoticComponent<AlertDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>; declare const AlertActions: import("react").ForwardRefExoticComponent<AlertActionsProps & import("react").RefAttributes<HTMLDivElement>>; declare const AlertComponent: typeof Alert & { Icon: typeof AlertIcon; Content: typeof AlertContent; Title: typeof AlertTitle; Description: typeof AlertDescription; Actions: typeof AlertActions; }; export { AlertComponent as Alert };