crates/storybook/src/component/mod.rs 🔗
@@ -1,2 +0,0 @@
-pub(crate) mod icon_button;
-pub(crate) mod tab;
Nate Butler and Piotr Osiewicz created
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
crates/storybook/src/component/mod.rs | 2 --
crates/storybook/src/components.rs | 6 ++++++
crates/storybook/src/components/icon_button.rs | 2 +-
crates/storybook/src/components/tab.rs | 2 +-
crates/storybook/src/module/mod.rs | 1 -
crates/storybook/src/modules.rs | 3 +++
crates/storybook/src/modules/tab_bar.rs | 3 +--
crates/storybook/src/storybook.rs | 3 +--
crates/storybook/src/workspace.rs | 2 +-
9 files changed, 14 insertions(+), 10 deletions(-)
@@ -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;
@@ -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},