thaw/demo_markdown/docs/avatar/mod.md
luoxiaozero 3684f5961b
demo: refactor docs (#67)
* demo: refactor docs

* demo: refactor docs

* demo: refactor guide docs

* chore: workflow add listens to the demo_markdown

* demo: refactor mobile docs
2024-01-03 20:52:56 +08:00

20 lines
937 B
Markdown

# Avatar
```rust demo
view! {
<Space>
<Avatar src="https://s3.bmp.ovh/imgs/2021/10/723d457d627fe706.jpg"/>
<Avatar src="https://s3.bmp.ovh/imgs/2021/10/723d457d627fe706.jpg" round=true/>
<Avatar src="https://s3.bmp.ovh/imgs/2021/10/723d457d627fe706.jpg" size=50/>
</Space>
}
```
### Avatar Props
| Name | Type | Default | Description |
| ----- | --------------------- | -------------------- | ----------------------------------------- |
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the avatar element. |
| src | `MaybeSignal<String>` | `Default::default()` | Avatar's image source. |
| round | `MaybeSignal<bool>` | `false` | Whether to display a rounded avatar. |
| size | `MaybeSignal<u16>` | `30` | Avatar's size. |