use gpui2::Div; use crate::prelude::*; pub struct Story {} impl Story { pub fn container(cx: &mut ViewContext) -> Div { div() .size_full() .flex() .flex_col() .pt_2() .px_4() .font("Zed Mono") .bg(cx.theme().colors().background) } pub fn title(cx: &mut ViewContext, title: &str) -> impl Component { div() .text_xl() .text_color(cx.theme().colors().text) .child(title.to_owned()) } pub fn title_for(cx: &mut ViewContext) -> impl Component { Self::title(cx, std::any::type_name::()) } pub fn label(cx: &mut ViewContext, label: &str) -> impl Component { div() .mt_4() .mb_2() .text_xs() .text_color(cx.theme().colors().text) .child(label.to_owned()) } }