This commit is contained in:
2024-12-14 22:36:23 +01:00
parent 2106283364
commit f753a27bbc
2 changed files with 16 additions and 1 deletions
+15
View File
@@ -4,6 +4,8 @@ pub fn todo_app() -> Element {
let todo = vec!["Foo", "Bar"];
rsx! {
// text { class: "title", "Todo list app made with OSUI" }
// text { class: "title", "{}", "-".repeat(crossterm::terminal::size().unwrap().0 as usize) }
for (t in todo) {
ersx!( button{ class: "todo", on_click: fn(btn: &mut Button, _, _) {
btn.class = if btn.class == "todo" {
@@ -23,10 +25,23 @@ pub fn todo_styling() -> Css {
y: Auto,
color: Red,
}
"todo": "hover" {
color: Blue
}
"complete" {
x: 0 px,
y: Auto,
color: Green,
}
"complete": "hover" {
color: Cyan
}
"title" {
x: 0 px,
y: Auto,
}
"title": "hover" {
color: Blue
}
}
}