Accordion builder
A stack of disclosure sections.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::navigation::Accordion;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
section(section: AccordionSection) -> Self
sections(sections: impl IntoIterator<Item = AccordionSection>) -> Self
expanded(ids: impl IntoIterator<Item = SharedString>) -> Self
expanded_ids<S: AsRef<str>>(ids: &[S]) -> Self
exclusive(exclusive: bool) -> Self
on_toggle(handler: impl Fn(SharedString, bool, &mut Window, &mut App) + 'static) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.