1#![allow(non_snake_case)]
4
5use strata_dom::{NodeBlueprint, View};
6use strata_macro::{component, rsx};
7
8#[component]
12pub fn ScrollArea(
13 id: Option<&'static str>,
14 class: Option<&'static str>,
15 children: Option<Vec<NodeBlueprint>>,
16 show_scrollbar: Option<bool>,
17) -> View {
18 let custom = class.unwrap_or("");
19 let container_id = id.unwrap_or("");
20 let _with_bar = show_scrollbar.unwrap_or(true);
21
22 rsx! {
23 <div
24 id={container_id}
25 class={format!("relative overflow-y-auto flex-1 flex flex-col min-h-0 w-full {}", custom)}
26 >
27 {children.unwrap_or_default()}
28 </div>
29 }
30}