From d4b1226eb235a8f185211efb24aa28d955981c76 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Wed, 28 Feb 2024 12:12:38 -0600 Subject: [PATCH] feat: added `theme_override` to page wrappers --- crates/site-app/src/pages/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/site-app/src/pages/mod.rs b/crates/site-app/src/pages/mod.rs index 34e0487..7d27bc8 100644 --- a/crates/site-app/src/pages/mod.rs +++ b/crates/site-app/src/pages/mod.rs @@ -12,9 +12,13 @@ use crate::components::basic::Link; pub fn SmallPageWrapper( children: Children, #[prop(default = "")] extra_class: &'static str, + #[prop(default = None)] theme_override: Option<&'static str>, ) -> impl IntoView { view! { -
+
{children()}
@@ -33,6 +37,7 @@ pub fn PageWrapper( #[prop(default = true)] backed: bool, #[prop(default = "")] extra_class: &'static str, + #[prop(default = None)] theme_override: Option<&'static str>, ) -> impl IntoView { view! {
+ )} data-theme=theme_override> {children()}
}