some refreactoring

This commit is contained in:
2024-12-05 11:14:47 +01:00
parent b1144d002c
commit 15d0cd22ee
9 changed files with 138 additions and 181 deletions
+30 -10
View File
@@ -19,18 +19,38 @@ pub fn examples() -> Element {
}
}
pub fn styling() -> Css {
css! {
"btn" {
outline: true,
x: Center,
y: Center,
width: Auto,
color: Red,
pub fn todo_app() -> Element {
rsx! {
styling: Some(styling()),
class: "root",
div {
class: "first",
text { class: "title", "not started" }
}
div {
class: "second",
text { class: "title", "completed" }
}
}
}
"btn": clicked {
color: Blue,
pub fn styling() -> Css {
css! {
"first" {
x: Auto,
y: 0 px,
width: 50%,
}
"second" {
x: Auto,
y: 0 px,
width: 50%,
}
"root" {
width: 100%,
}
"title" {
x: Center
}
}
}