Restructure storybook modules and components

Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This commit is contained in:
Nate Butler 2023-09-11 11:05:10 -04:00
parent 2774eae21a
commit 917884ffaf
9 changed files with 14 additions and 10 deletions

View File

@ -1,2 +0,0 @@
pub(crate) mod icon_button;
pub(crate) mod tab;

View File

@ -4,6 +4,12 @@ use gpui2::{
};
use std::{marker::PhantomData, rc::Rc};
mod icon_button;
mod tab;
pub(crate) use icon_button::{icon_button, ButtonVariant};
pub(crate) use tab::tab;
struct ButtonHandlers<V, D> {
click: Option<Rc<dyn Fn(&mut V, &D, &mut EventContext<V>)>>,
}

View File

@ -5,7 +5,7 @@ use gpui2::{elements::div, IntoElement};
use gpui2::{Element, ParentElement, ViewContext};
#[derive(Element)]
struct IconButton {
pub(crate) struct IconButton {
path: &'static str,
variant: ButtonVariant,
}

View File

@ -4,7 +4,7 @@ use gpui2::{elements::div, IntoElement};
use gpui2::{Element, ParentElement, ViewContext};
#[derive(Element)]
struct Tab {
pub(crate) struct Tab {
title: &'static str,
active: bool,
}

View File

@ -1 +0,0 @@
pub(crate) mod tab_bar;

View File

@ -0,0 +1,3 @@
mod tab_bar;
pub(crate) use tab_bar::tab_bar;

View File

@ -1,7 +1,6 @@
use std::marker::PhantomData;
use crate::component::icon_button::{icon_button, ButtonVariant};
use crate::component::tab::tab;
use crate::components::{icon_button, tab, ButtonVariant};
use crate::theme::theme;
use gpui2::elements::div::ScrollState;
use gpui2::style::StyleHelpers;

View File

@ -10,10 +10,9 @@ use settings::{default_settings, SettingsStore};
use simplelog::SimpleLogger;
mod collab_panel;
mod component;
mod components;
mod element_ext;
mod module;
mod modules;
mod theme;
mod workspace;

View File

@ -1,4 +1,4 @@
use crate::{collab_panel::collab_panel, module::tab_bar::tab_bar, theme::theme};
use crate::{collab_panel::collab_panel, modules::tab_bar, theme::theme};
use gpui2::{
elements::{div, div::ScrollState, img, svg},
style::{StyleHelpers, Styleable},