mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-24 19:59:50 -04:00
Better nav organization in ui
This commit is contained in:
parent
3b6987e4cc
commit
9eeeed9e6b
@ -24,15 +24,21 @@ pub struct TabState<G: GenericNode> {
|
|||||||
#[component(TabbedView<G>)]
|
#[component(TabbedView<G>)]
|
||||||
pub fn tabbed_view(state: TabState<G>) -> View<G> {
|
pub fn tabbed_view(state: TabState<G>) -> View<G> {
|
||||||
cloned!((state) => view! {
|
cloned!((state) => view! {
|
||||||
input(type="button", value="Plan", class="no-print", on:click=cloned!((state) => move |_| {
|
div(class="nav-header no-print") {
|
||||||
state.route.set(AppRoutes::Plan);
|
a(class="no-print", on:click=cloned!((state) => move |_| {
|
||||||
}))
|
state.route.set(AppRoutes::Plan);
|
||||||
input(type="button", value="Inventory", class="no-print", on:click=cloned!((state) => move |_| {
|
})) { "Plan" }
|
||||||
state.route.set(AppRoutes::Inventory);
|
" | "
|
||||||
}))
|
a(class="no-print", on:click=cloned!((state) => move |_| {
|
||||||
input(type="button", value="Cook", class="no-print", on:click=cloned!((state) => move |_| {
|
state.route.set(AppRoutes::Inventory);
|
||||||
state.route.set(AppRoutes::Cook);
|
})) { "Inventory" }
|
||||||
}))
|
" | "
|
||||||
(state.inner)
|
a(on:click=cloned!((state) => move |_| {
|
||||||
|
state.route.set(AppRoutes::Cook);
|
||||||
|
})) { "Cook" }
|
||||||
|
}
|
||||||
|
div {
|
||||||
|
(state.inner)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user