Alert
A component for displaying important messages to users.
Basic Usage
Informational
This is a standard informational message.
Success
Your changes have been saved successfully.
Warning
This action is irreversible. Proceed with caution.
Error
Failed to fetch data from the server.
<prism-alert
type="success"
title="Success"
description="Action completed successfully."
[showIcon]="true">
</prism-alert>Closeable
Notification
This alert can be closed by clicking the X button.
<prism-alert
type="info"
title="Closeable"
description="You can close this alert."
[closeable]="true"
(onClose)="handleClose()">
</prism-alert>API
| Name | Type | Default | Description |
|---|---|---|---|
type | 'success' | 'info' | 'warning' | 'error' | 'info' | Type of the alert. |
title | string | '-' | Title of the alert. |
description | string | '-' | Description body of the alert. |
showIcon | boolean | false | Whether to show an icon. |
closeable | boolean | false | Whether the alert can be closed. |
onClose | EventEmitter<void> | - | Callback when the alert is closed. |