zero_ui/lib/app-layout.rs
1use leptos::*;
2
3#[component]
4pub fn AppLayout<B, BIV, S, SIV>(body: B, sidebar: S) -> impl IntoView
5where
6 B: Fn() -> BIV,
7 BIV: IntoView,
8 S: Fn() -> SIV,
9 SIV: IntoView,
10{
11 view! {
12 <div id="AppLayout" class="flex h-screen w-screen zero-divide-x">
13 <div id="SidebarContainer" class="flex h-screen">
14 {sidebar()}
15 </div>
16 <div id="BodyContainer" class="flex flex-1">
17 {body()}
18 </div>
19 </div>
20 }
21}
22