AlertMessage Component
Description
The AlertMessage
component is a wrapper around the Alert
component that provides automatic dismissal for non-error messages.
Props
Prop | Type | Default | Description |
---|---|---|---|
open |
boolean |
false |
Controls whether the alert is visible. |
severity |
"success" , "info" , "warning" , "error" |
"info" |
Defines the severity of the alert. |
message |
string |
"" |
The text displayed inside the alert. |
onClose |
() => void |
undefined |
Callback function triggered when the alert is closed. |
Behavior
- If the
severity
is not error, the alert will automatically close after 3 seconds. - Clicking the close button will manually dismiss the alert.
Example Usage
Useful Links
🔗 GitHub Repository (Core): Liberty Core
🔗 GitHub Repository (Test Project): Liberty Test
📖 Live Documentation: Liberty Core Docs
💖 Sponsor & Support: Sponsor Liberty Core