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