Basic repl

This commit is contained in:
Chance 2024-12-01 16:02:06 -05:00
commit 408f351332
19 changed files with 564 additions and 0 deletions

7
editor/Cargo.toml Normal file
View file

@ -0,0 +1,7 @@
[package]
name = "editor"
version = "0.1.0"
edition = "2021"
[dependencies]
floem = "0.2.0"

18
editor/src/main.rs Normal file
View file

@ -0,0 +1,18 @@
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))
}