Formatting fixes fore recipe rendering

This commit is contained in:
Jeremy Wall 2022-02-14 15:54:26 -05:00
parent b84b2722aa
commit a609db119a
2 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,7 @@ fn steps(steps: ReadSignal<Vec<recipes::Step>>) -> View<G> {
iterable: Signal::new(step.ingredients).handle(),
template: |i| { view! {
li {
(i.amt) (i.name) (i.form.as_ref().map(|f| format!("({})", f)).unwrap_or(String::new()))
(i.amt) " " (i.name) " " (i.form.as_ref().map(|f| format!("({})", f)).unwrap_or(String::new()))
}
}}
})

View File

@ -88,6 +88,8 @@ fn shopping_list() -> View<G> {
let amt = Signal::new(format!("{}", i.amt.normalize()));
view! {
tr {
// TODO(jwall): What is the mechanism for deleting ingredients
// from the list?
td { input(bind:value=amt.clone(), type="text") }
td { (i.name) }
}