,
children: Children,
) -> impl IntoView {
mount_style("layout", include_str!("./layout.css"));
- let style = create_memo(move |_| {
- let mut new_style = style.as_ref().map(|s| s.get()).unwrap_or_default();
+ let sider_style = create_memo(move |_| {
if has_sider.get() {
- new_style
- .push_str("display: flex; flex-wrap: nowrap; flex-direction: row; width: 100%;");
-
- Some(new_style)
- } else if style.is_some() {
- Some(new_style)
+ Some("display: flex; flex-wrap: nowrap; flex-direction: row; width: 100%;")
} else {
None
}
@@ -49,9 +46,11 @@ pub fn Layout(
view! {
- {children()}
+
+ {children()}
+
}
}