kitchen_ui/widgets/
row.rs1use gpui_kit::component::h_flex;
4use gpui_kit::{IntoElement, ParentElement as _, SharedString, Styled as _, div, px};
5
6use crate::theme::{self, color};
7
8pub fn row(label: impl Into<SharedString>, control: impl IntoElement) -> impl IntoElement {
13 h_flex()
14 .w_full()
15 .flex_wrap()
16 .gap(px(theme::SM))
17 .child(div().flex_none().w(px(theme::LABEL_W)).text_sm().text_color(color::text_muted()).child(label.into()))
18 .child(h_flex().flex_1().min_w(px(theme::CONTROL_MIN_W)).justify_end().child(control))
19}