test
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ macro_rules! parse_rsx_param {
|
||||
};
|
||||
|
||||
($elem:expr, $text:expr, $($inner:tt)*) => {
|
||||
$elem.children.set_text_force(&format!($text, $($inner)*))
|
||||
$elem.children.set_text_force(std::sync::Arc::new(move || format!($text, $($inner)*)))
|
||||
};
|
||||
|
||||
($elem:expr, ) => {};
|
||||
|
||||
Reference in New Issue
Block a user