Skip to content

Commit

Permalink
Update to yew 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaModder committed Aug 19, 2020
1 parent 3f2db30 commit 2df0873
Show file tree
Hide file tree
Showing 25 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ image-list = []
tabs = ["serde", "serde_json", "wasm-bindgen/serde-serialize"]

[dependencies]
yew = { version = "0.16", default-features = false, features = ["web_sys"] }
yew = { version = "0.17", default-features = false, features = ["web_sys"] }
wasm-bindgen = "0.2"
js-sys = "0.3"
lazy_static = "*"
Expand Down
4 changes: 2 additions & 2 deletions src/components/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ impl Component for Button {
let inner = if self.props.trailingicon {
html! { <>
<span class="mdc-button__label">{ &self.props.text }</span>
{ self.props.children.render() }
{ self.props.children.clone() }
</> }
} else {
html! { <>
{ self.props.children.render() }
{ self.props.children.clone() }
<span class="mdc-button__label">{ &self.props.text }</span>
</> }
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Component for Card {
oncontextmenu=emit_contextclick
onmouseenter=emit_hoverenter
onmouseleave=emit_hoverleave>
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl Component for Media {
html! {
<div id=&self.props.id class=classes style=&self.props.raw_css>
<div class="mdc-card__media-content">
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/primary_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl Component for PrimaryAction {
tabindex="0"
onclick=emit_click
oncontextmenu=emit_contextclick>
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl Component for Dialog {
<div class="mdc-dialog__container">
<div class="mdc-dialog__surface">
<h2 class="mdc-dialog__title">{ &self.props.title }</h2>
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
</div>
<div class="mdc-dialog__scrim"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Component for Actions {
fn view(&self) -> Html {
html! {
<div class="mdc-dialog__actions">
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Component for Content {
fn view(&self) -> Html {
html! {
<div class="mdc-dialog__content">
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/drawer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Component for Drawer {
fn view(&self) -> Html {
html! {
<aside class="mdc-drawer" id=&self.props.id>
{ self.props.children.render() }
{ self.props.children.clone() }
</aside>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/drawer/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl Component for Content {
fn view(&self) -> Html {
html! {
<div class="mdc-drawer__content" id=&self.props.id>
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/drawer/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl Component for Header {
fn view(&self) -> Html {
html! {
<div class="mdc-drawer__header" id=&self.props.id>
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/fab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Component for FAB {
ref=self.node_ref.clone()
onclick=onclick>
{ ripple }
{ self.props.children.render() }
{ self.props.children.clone() }
{ label }
</button>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/icon_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl Component for IconButton {
onclick=onclick
disabled=self.props.disabled
tabindex=self.props.tabindex>
{ self.props.children.render() }
{ self.props.children.clone() }
</button>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/image_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Component for ImageList {
fn view(&self) -> Html {
html! {
<ul id=&self.props.id class=format!("mdc-image-list {}", self.props.classes)>
{ self.props.children.render() }
{ self.props.children.clone() }
</ul>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/image_list/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Component for Item {
onmouseenter=self.link.callback(Msg::MouseEnter)
onmouseleave=self.link.callback(Msg::MouseLeave)
>
{ self.props.children.render() }
{ self.props.children.clone() }
</li>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/image_list/item/supporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Component for Supporting {
fn view(&self) -> Html {
html! {
<div id=&self.props.id class=format!("mdc-image-list__supporting {}", self.props.classes)>
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl Component for Menu {
<div class="mdc-menu mdc-menu-surface" id=&self.props.id
ref=self.node_ref.clone()>
<ul class="mdc-list" role="menu" aria-hidden="true" aria-orientation="vertical" tabindex="-1">
{ self.props.children.render() }
{ self.props.children.clone() }
</ul>
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Component for Item {
};
html! {
<li class=classes role="menuitem" id=&self.props.id onclick=onclick>
{ self.props.children.render() }
{ self.props.children.clone() }
{ text }
</li>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/tabs/tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Component for Tab {
html! {
<button class=classes id=&self.props.id>
<span class="mdc-tab__content">
{ self.props.children.render() }
{ self.props.children.clone() }
{ inner_indic }
</span>
{ outer_indic }
Expand Down
2 changes: 1 addition & 1 deletion src/components/tabs/tab_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl Component for TabBar {
id=&self.props.id
onclick=Callback::noop()
>
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/tabs/tab_scroller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Component for TabScroller {
<div class="mdc-tab-scroller" id=&self.props.id>
<div class="mdc-tab-scroller__scroll-area">
<div class="mdc-tab-scroller__scroll-content">
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/text_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl Component for TextField {
.callback(|e: InputData| Msg::ValueChanged(e.value));
html! {
<div class=classes id=&self.props.id ref=self.node_ref.clone()>
{ self.props.children.render() }
{ self.props.children.clone() }
<input type="text"
value=self.props.value
class="mdc-text-field__input"
Expand Down
2 changes: 1 addition & 1 deletion src/components/text_field/helper_line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Component for HelperLine {
html! {
<div class="mdc-text-field-helper-line">
<div class=classes aria-hidden="true">
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
</div>
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/top_app_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ impl Component for TopAppBar {
if self.props.manualrows {
html! {
<header class=classes id=&self.props.id>
{ self.props.children.render() }
{ self.props.children.clone() }
</header>
}
} else {
html! {
<header class=classes id=&self.props.id>
<div class="mdc-top-app-bar__row">
{ self.props.children.render() }
{ self.props.children.clone() }
</div>
</header>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/top_app_bar/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl Component for Section {
let classes = format!("mdc-top-app-bar__section {}", self.props.align);
html! {
<section class=classes id=&self.props.id>
{ self.props.children.render() }
{ self.props.children.clone() }
</section>
}
}
Expand Down

0 comments on commit 2df0873

Please sign in to comment.