UNPKG

@devopness/ui-react

Version:

Devopness Design System React Components - Painless essential DevOps to everyone

39 lines (38 loc) 1 kB
import { default as React } from 'react'; type AlertProps = { /** Alert variation type that defines its appearance and icon */ type: 'error' | 'success' | 'warning'; /** Content to be displayed inside the alert */ alertDescription: React.ReactNode; /** * Disable default padding * @default false */ noPadding?: boolean; /** * Show close button in the alert * @default false */ canClose?: boolean; /** * Callback function triggered when the close button is clicked * Only works when canClose is true */ onClose?: () => void; }; /** * Alert component for displaying feedback messages to users * * @example * ```jsx * <Alert * type="success" * alertDescription="Operation completed successfully" * canClose * onClose={() => console.log('Alert closed')} * /> * ``` */ declare const Alert: (props: AlertProps) => import("react/jsx-runtime").JSX.Element; export type { AlertProps }; export { Alert };