summary refs log tree commit diff
path: root/modules/site_test/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/site_test/src/main.rs')
-rw-r--r--modules/site_test/src/main.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/site_test/src/main.rs b/modules/site_test/src/main.rs
index 9201c8a..b0fe9f3 100644
--- a/modules/site_test/src/main.rs
+++ b/modules/site_test/src/main.rs
@@ -3,7 +3,7 @@ use morgana::{morx, Component, RenderNode};
 pub fn main() {
     let parent = morx! {
         ParentLayout {
-            Child {
+            Child some_prop={"something".to_string()} {
                 "Hello world!"
             }
         }
@@ -19,10 +19,13 @@ struct ParentLayout {
 
 impl Component for ParentLayout {
     fn render(self: Box<Self>) -> RenderNode {
+        let string = "test string";
+
         morx!{
+            !doctype html;
             html lang = "en-US" {
                 head {
-                    title = "test thing"
+                    title ={string}
                 }
                 body = {self.children}
             }
@@ -31,13 +34,15 @@ impl Component for ParentLayout {
 }
 
 struct Child {
-    children: Vec<RenderNode>
+    children: Vec<RenderNode>,
+    some_prop: String,
 }
 
 impl Component for Child {
     fn render(self: Box<Self>) -> RenderNode {
         morx! {
             p= {self.children}
+            p= {self.some_prop}
         }
     }
 }