thaw/demo_markdown/docs/text/mod.md

22 lines
865 B
Markdown
Raw Normal View History

# Typography
```rust demo
view! {
<Space>
<Text>"text"</Text>
2024-07-12 10:06:43 +08:00
<Text tag=TextTag::Code>"code"</Text>
2024-06-03 16:31:32 +08:00
<Caption1>"Caption1"</Caption1>
<Caption1Strong>"Caption1Strong"</Caption1Strong>
<Body1>"Body1"</Body1>
</Space>
}
```
## Text Props
2024-02-09 22:44:22 +08:00
| Name | Type | Default | Description |
| -------- | ----------------------------------- | -------------------- | --------------------------------------- |
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the text element. |
| code | `bool` | `false` | Use the code tag and style. |
| children | `Children` | | Text's content. |