Docs
Alert
Alert
Display warning messages that require attention.
Successful!
Usage
Example Code
1import { Alert } from "inc-design-system/alert";
Example Code
1<Alert>
2 <h1>Successful!</h1>
3</Alert>
Props
Alert
Prop | Type | Description | Default |
---|---|---|---|
className | string | Additional CSS classes to apply to the alert. | - |
variant | "info" | "danger" | "warning" | "success" | Sets the variant of the alert. | "info" |
showIcon | boolean | Sets whether to show or hide the relevant icon. | true |
dismissible | boolean | Sets whether to show or hide the 'X' that allows the alert to be dismissed. | false |
onDismiss | () => void | A function that will be called upon the dismissal of the Alert, can only be triggered if dismissible={true}. | - |