gpui-kit GitHub

Components

SettingsSection builder

A headed group of settings rows.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::controls::SettingsSection;

Construct

new(ident: impl Into<Ident>, title: impl Into<SharedString>) -> Self

Options

Chain onto the value.

description(description: impl Into<SharedString>) -> Self
dimmed_by(reason: impl Into<SharedString>) -> Self
row(row: SettingsRow) -> Self
rows(rows: impl IntoIterator<Item = SettingsRow>) -> Self
action(action: impl Fn(&mut Window, &mut App) -> AnyElement + 'static) -> Self

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/controls/settings_row.rs