2023-12-31 23:33:05 +08:00
|
|
|
# Modal
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
let show = create_rw_signal(false);
|
|
|
|
|
|
|
|
view! {
|
|
|
|
<Button on_click=move |_| show.set(true)>"Open Modal"</Button>
|
|
|
|
<Modal title="title" show>
|
|
|
|
"hello"
|
|
|
|
</Modal>
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Modal Props
|
|
|
|
|
|
|
|
| Name | Type | Default | Description |
|
|
|
|
| -------- | --------------------- | -------------------- | ---------------------- |
|
2024-02-09 22:44:22 +08:00
|
|
|
| show | `Model<bool>` | | Whether to show modal. |
|
2023-12-31 23:33:05 +08:00
|
|
|
| title | `MaybeSignal<String>` | `Default::default()` | Modal title. |
|
|
|
|
| children | `Children` | | Modal's content. |
|
|
|
|
|
|
|
|
### Modal Slots
|
|
|
|
|
|
|
|
| Name | Default | Description |
|
|
|
|
| ----------- | ------- | --------------- |
|
|
|
|
| ModalFooter | `None` | Footer content. |
|