better structure
This commit is contained in:
+3
-8
@@ -4,22 +4,17 @@ use osui::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let some_text = app(ComponentParams {
|
let doc = oml!(div {app()});
|
||||||
children: vec![],
|
|
||||||
expr: "".to_string(),
|
|
||||||
});
|
|
||||||
let doc = oml!(div { some_text; });
|
|
||||||
|
|
||||||
println!("{:?}", doc);
|
println!("{:?}", doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app(_: ComponentParams) -> Box<Div> {
|
fn app(_: ComponentParams) -> Div {
|
||||||
oml!(
|
*oml!(
|
||||||
// Components (C)
|
// Components (C)
|
||||||
div {
|
div {
|
||||||
// Props, With components (PC)
|
// Props, With components (PC)
|
||||||
div () {
|
div () {
|
||||||
|
|
||||||
// Props (P)
|
// Props (P)
|
||||||
text(/* Properties go here, Example: x = 20 y = 5 */)
|
text(/* Properties go here, Example: x = 20 y = 5 */)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user