ToggleGroup builder
A run of toggles where none, one, or several may be in.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::controls::ToggleGroup;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
label(label: impl Into<SharedString>) -> Self
items(items: impl IntoIterator<Item = ToggleItem>) -> Self
selection(selection: ToggleSelection) -> Self
pressed(ids: impl IntoIterator<Item = SharedString>) -> Self
pressed_ids<S: AsRef<str>>(ids: &[S]) -> Self
variant(variant: ButtonVariant) -> Self
on_change(handler: impl Fn(Vec<SharedString>, SharedString, &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.