mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-05 04:45:13 +03:00
Restructure storybook modules and components
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This commit is contained in:
parent
2774eae21a
commit
917884ffaf
@ -1,2 +0,0 @@
|
||||
pub(crate) mod icon_button;
|
||||
pub(crate) mod tab;
|
@ -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>)>>,
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
@ -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,
|
||||
}
|
@ -1 +0,0 @@
|
||||
pub(crate) mod tab_bar;
|
3
crates/storybook/src/modules.rs
Normal file
3
crates/storybook/src/modules.rs
Normal file
@ -0,0 +1,3 @@
|
||||
mod tab_bar;
|
||||
|
||||
pub(crate) use tab_bar::tab_bar;
|
@ -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;
|
@ -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;
|
||||
|
||||
|
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user