MCPcopy Create free account
hub / github.com/audulus/rui / button_example

Function button_example

examples/gallery.rs:3–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1use rui::*;
2
3fn button_example() -> impl View {
4 hstack((
5 caption("button"),
6 button("press me", |_| println!("pressed")),
7 ))
8}
9
10fn slider_example() -> impl View {
11 hstack((caption("slider"), state(|| 0.5, |s, _| hslider(s))))

Callers 1

mainFunction · 0.85

Calls 3

hstackFunction · 0.85
captionFunction · 0.85
buttonFunction · 0.85

Tested by

no test coverage detected