mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-23 22:39:23 -05:00
1e4832a6d0
* demo: refactor docs * demo: refactor docs * demo: refactor docs * demo: refactor docs
49 lines
1.2 KiB
Markdown
49 lines
1.2 KiB
Markdown
# Space
|
|
|
|
```rust demo
|
|
view! {
|
|
<Space>
|
|
<Button>"1"</Button>
|
|
<Button>"2"</Button>
|
|
<Button>"3"</Button>
|
|
</Space>
|
|
}
|
|
```
|
|
|
|
### Vertical
|
|
|
|
```rust demo
|
|
view! {
|
|
<Space vertical=true>
|
|
<Button>"1"</Button>
|
|
<Button>"2"</Button>
|
|
<Button>"3"</Button>
|
|
</Space>
|
|
}
|
|
```
|
|
|
|
### Gap
|
|
|
|
```rust demo
|
|
view! {
|
|
<Space gap=SpaceGap::Large>
|
|
<Button>"1"</Button>
|
|
<Button>"2"</Button>
|
|
<Button>"3"</Button>
|
|
</Space>
|
|
<Space gap=SpaceGap::WH(36, 36)>
|
|
<Button>"1"</Button>
|
|
<Button>"2"</Button>
|
|
<Button>"3"</Button>
|
|
</Space>
|
|
}
|
|
```
|
|
|
|
### Space Props
|
|
|
|
| Name | Type | Default | Description |
|
|
| -------- | --------------------- | -------------------- | ---------------------------------------- |
|
|
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the space element. |
|
|
| vertical | `bool` | `false` | Whether to lay out vertically. |
|
|
| gap | `SpaceGap` | `SpaceGap::Medium` | Space's gap. |
|
|
| children | `Children` | | Space's content. |
|