forked from nonsensical-dev/zenyx-engine
18 lines
No EOL
486 B
Rust
18 lines
No EOL
486 B
Rust
use floem::{prelude::*, style::Style};
|
|
|
|
fn main() {
|
|
floem::launch(counter_view);
|
|
}
|
|
|
|
fn counter_view() -> impl IntoView {
|
|
let mut counter = RwSignal::new(20);
|
|
v_stack({
|
|
label("test")
|
|
}).style(Style::d);
|
|
h_stack((
|
|
button("Increment").action(move || counter += 1),
|
|
label(move || format!("Value: {counter}")),
|
|
button("Decrement").action(move || counter -= 1),
|
|
))
|
|
.style(|s| s.size_full().items_center().justify_center().gap(10))
|
|
} |