diff --git a/demo/src/components/demo.rs b/demo/src/components/demo.rs index 82d1d7b..bce1da2 100644 --- a/demo/src/components/demo.rs +++ b/demo/src/components/demo.rs @@ -42,7 +42,7 @@ pub fn Demo(demo_code: DemoCode, children: Children) -> impl IntoView { let content_class = create_memo(move |_| { theme.with(|theme| { format!( - "thaw-demo__content color-scheme--{}", + "color-scheme--{}", theme.common.color_scheme ) }) @@ -66,21 +66,17 @@ pub fn Demo(demo_code: DemoCode, children: Children) -> impl IntoView {
{
if is_highlight {
view! {
-
+
}
} else {
view! {
-
- {html}
-
+
}
}
}
-
{children()}
}
+ view! {
+
+ {
+ if let Some(inner_html) = inner_html {
+ view! {
+
+ }.into()
+ } else if let Some(text) = text {
+ view! {
+ {text}
+ }.into()
+ } else {
+ None
+ }
+ }
+
+ }
}