Add ListItem
story
This commit is contained in:
parent
feb7753a73
commit
19ecccb107
3 changed files with 35 additions and 6 deletions
|
@ -8,7 +8,6 @@ use clap::ValueEnum;
|
|||
use gpui::{AnyView, VisualContext};
|
||||
use strum::{EnumIter, EnumString, IntoEnumIterator};
|
||||
use ui::prelude::*;
|
||||
use ui::{AvatarStory, ButtonStory, IconStory, InputStory, LabelStory};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, strum::Display, EnumString, EnumIter)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
|
@ -22,6 +21,7 @@ pub enum ComponentStory {
|
|||
Input,
|
||||
Keybinding,
|
||||
Label,
|
||||
ListItem,
|
||||
Scroll,
|
||||
Text,
|
||||
ZIndex,
|
||||
|
@ -31,15 +31,16 @@ pub enum ComponentStory {
|
|||
impl ComponentStory {
|
||||
pub fn story(&self, cx: &mut WindowContext) -> AnyView {
|
||||
match self {
|
||||
Self::Avatar => cx.build_view(|_| AvatarStory).into(),
|
||||
Self::Button => cx.build_view(|_| ButtonStory).into(),
|
||||
Self::Avatar => cx.build_view(|_| ui::AvatarStory).into(),
|
||||
Self::Button => cx.build_view(|_| ui::ButtonStory).into(),
|
||||
Self::Checkbox => cx.build_view(|_| ui::CheckboxStory).into(),
|
||||
Self::ContextMenu => cx.build_view(|_| ui::ContextMenuStory).into(),
|
||||
Self::Focus => FocusStory::view(cx).into(),
|
||||
Self::Icon => cx.build_view(|_| IconStory).into(),
|
||||
Self::Input => cx.build_view(|_| InputStory).into(),
|
||||
Self::Icon => cx.build_view(|_| ui::IconStory).into(),
|
||||
Self::Input => cx.build_view(|_| ui::InputStory).into(),
|
||||
Self::Keybinding => cx.build_view(|_| ui::KeybindingStory).into(),
|
||||
Self::Label => cx.build_view(|_| LabelStory).into(),
|
||||
Self::Label => cx.build_view(|_| ui::LabelStory).into(),
|
||||
Self::ListItem => cx.build_view(|_| ui::ListItemStory).into(),
|
||||
Self::Scroll => ScrollStory::view(cx).into(),
|
||||
Self::Text => TextStory::view(cx).into(),
|
||||
Self::ZIndex => cx.build_view(|_| ZIndexStory).into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue