Add multiple classes demo

This commit is contained in:
Denis Kolodin 2017-12-30 19:35:14 +03:00
parent 366e514fab
commit f8bd9e70fd
2 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ fn view(model: &Model) -> Html<Msg> {
fn view_first_name_input(model: &Model) -> Html<Msg> {
html! {
<input class="new-client-firstname",
<input class=("new-client", "firstname"),
placeholder="First name",
value=&model.first_name_value,
oninput=|e: InputData| Msg::UpdateFirstName(e.value),
@ -109,7 +109,7 @@ fn view_first_name_input(model: &Model) -> Html<Msg> {
fn view_last_name_input(model: &Model) -> Html<Msg> {
html! {
<input class="new-client-lastname",
<input class=("new-client", "lastname"),
placeholder="Last name",
value=&model.last_name_value,
oninput=|e: InputData| Msg::UpdateLastName(e.value),

View File

@ -180,7 +180,7 @@ fn view_input(model: &Model) -> Html<Msg> {
fn view_entry((idx, entry): (usize, &Entry)) -> Html<Msg> {
html! {
<li class={ if entry.editing == true { "editing" } else { "" }},>
<li class=if entry.editing == true { "editing" } else { "" },>
<div class="view",>
<input class="toggle", type="checkbox", checked=entry.completed, onclick=move|_| Msg::Toggle(idx), />
<label ondoubleclick=move|_| Msg::ToggleEdit(idx),>{ &entry.description }</label>