2024-01-03 20:52:56 +08:00
|
|
|
# Alert
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
view! {
|
|
|
|
<Space vertical=true>
|
|
|
|
<Alert variant=AlertVariant::Success title="title">
|
|
|
|
"success"
|
|
|
|
</Alert>
|
|
|
|
<Alert variant=AlertVariant::Warning title="title">
|
|
|
|
"warning"
|
|
|
|
</Alert>
|
|
|
|
<Alert variant=AlertVariant::Error title="title">
|
|
|
|
"error"
|
|
|
|
</Alert>
|
|
|
|
</Space>
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Alert Props
|
|
|
|
|
2024-02-09 22:44:22 +08:00
|
|
|
| Name | Type | Default | Description |
|
|
|
|
| -------- | ----------------------------------- | -------------------- | ----------------------------------------- |
|
|
|
|
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Additional classes for the alert element. |
|
|
|
|
| title | `Option<MaybeSignal<String>>` | `Default::default()` | Title of the alert. |
|
|
|
|
| variant | `MaybeSignal<AlertVariant>` | | Alert variant. |
|
|
|
|
| children | `Children` | | The content of the alert. |
|