From 7927d8b4c9bf849d56ada458edafc3ecc2bff5e9 Mon Sep 17 00:00:00 2001 From: dancespiele Date: Wed, 14 Jul 2021 21:06:20 +0200 Subject: [PATCH] fix issue multiple navbar containers in mobile screens (#102) * fix issue multiple navbar containers in mobile screens * update Yew Styles version --- crate/Cargo.lock | 4 ++-- crate/Cargo.toml | 2 +- crate/yew_styles/Cargo.toml | 2 +- crate/yew_styles/src/components/navbar/navbar_component.rs | 6 +++--- crate/yew_styles/src/components/navbar/navbar_container.rs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crate/Cargo.lock b/crate/Cargo.lock index 00d434b..8920824 100644 --- a/crate/Cargo.lock +++ b/crate/Cargo.lock @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "yew_style_page" -version = "0.9.3" +version = "0.9.4" dependencies = [ "Inflector", "cfg-if 1.0.0", @@ -938,7 +938,7 @@ dependencies = [ [[package]] name = "yew_styles" -version = "0.9.3" +version = "0.9.4" dependencies = [ "getrandom", "rand", diff --git a/crate/Cargo.toml b/crate/Cargo.toml index 9112bda..44cdb86 100644 --- a/crate/Cargo.toml +++ b/crate/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" name = "yew_style_page" readme = "./README.md" repository = "https://github.com/spielrs/yew-styles-page.git" -version = "0.9.3" +version = "0.9.4" [lib] crate-type = ["cdylib"] diff --git a/crate/yew_styles/Cargo.toml b/crate/yew_styles/Cargo.toml index 1880281..0bea134 100644 --- a/crate/yew_styles/Cargo.toml +++ b/crate/yew_styles/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yew_styles" -version = "0.9.3" +version = "0.9.4" description = "Framework styles for yew" documentation = "https://docs.rs/crate/yew_styles" authors = ["Francisco Jesus Navarro Cortes "] diff --git a/crate/yew_styles/src/components/navbar/navbar_component.rs b/crate/yew_styles/src/components/navbar/navbar_component.rs index 2afe459..a16aa6c 100644 --- a/crate/yew_styles/src/components/navbar/navbar_component.rs +++ b/crate/yew_styles/src/components/navbar/navbar_component.rs @@ -295,9 +295,9 @@ impl Component for Navbar { {get_branch(self.props.branch.clone())} {if !self.display_menu { - html!{<>{self.props.children.clone()}} - }else { - html!{} + self.props.children.clone() + } else { + Children::new(vec![]) } } diff --git a/crate/yew_styles/src/components/navbar/navbar_container.rs b/crate/yew_styles/src/components/navbar/navbar_container.rs index ffeccf7..74057ef 100644 --- a/crate/yew_styles/src/components/navbar/navbar_container.rs +++ b/crate/yew_styles/src/components/navbar/navbar_container.rs @@ -105,11 +105,11 @@ pub struct Props { /// {"Shop"} /// /// +/// onclick_signal=link.callback(move |_| Msg::ChangeMenu(String::from("About us")))> /// {"About us"} /// /// +/// onclick_signal=link.callback(move |_| Msg::ChangeMenu(String::from("Contact")))> /// {"Contact"} /// ///