Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
matthunz committed Oct 22, 2023
1 parent 2a11edc commit 01f5745
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,28 @@
<br>

```rs
use_theme_provider(cx, Theme::default());
Theme {
Button { onclick: |_| log::info!("clicked!"), "Click me!" }

Button { onclick: |_| log::info!("clicked!"), "Click me!" }
Icon { kind: IconKind::Home, is_filled: true, size: 100. }

TextButton { onclick: |_| log::info!("clicked!"), "Click me!" }
TextButton { onclick: |_| log::info!("clicked!"), "Click me!" }

TabRow {
onselect: |idx| log::info!("{}", idx),
tabs: cx
.bump()
.alloc([
render!(Tab { "Tab 1" }),
render!(Tab { "Tab 2" }),
render!(Tab { "Tab 3" }),
])
}
TabRow {
onselect: |idx| log::info!("{}", idx),
tabs: cx
.bump()
.alloc([
render!(Tab { "Tab 1" }),
render!(Tab { "Tab 2" }),
render!(Tab { "Tab 3" }),
])
}

TextField {
label: "Text field",
value: "{value}",
onchange: move |event: FormEvent| value.set(event.value.clone())
TextField {
label: "Text field",
value: "{value}",
onchange: move |event: FormEvent| value.set(event.value.clone())
}
}
```

0 comments on commit 01f5745

Please sign in to comment.