Update storybook2 to run the workspace by default
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
This commit is contained in:
parent
a6a50113da
commit
a35d350cbd
1 changed files with 23 additions and 35 deletions
|
@ -17,6 +17,7 @@ use gpui3::{
|
||||||
};
|
};
|
||||||
use log::LevelFilter;
|
use log::LevelFilter;
|
||||||
use simplelog::SimpleLogger;
|
use simplelog::SimpleLogger;
|
||||||
|
use story_selector::ComponentStory;
|
||||||
use ui::prelude::*;
|
use ui::prelude::*;
|
||||||
use ui::themed;
|
use ui::themed;
|
||||||
|
|
||||||
|
@ -56,41 +57,28 @@ fn main() {
|
||||||
|
|
||||||
let asset_source = Arc::new(Assets);
|
let asset_source = Arc::new(Assets);
|
||||||
gpui3::App::production(asset_source).run(move |cx| {
|
gpui3::App::production(asset_source).run(move |cx| {
|
||||||
match story_selector {
|
let selector =
|
||||||
Some(selector) => {
|
story_selector.unwrap_or(StorySelector::Component(ComponentStory::Workspace));
|
||||||
let window = cx.open_window(
|
|
||||||
WindowOptions {
|
let window = cx.open_window(
|
||||||
bounds: WindowBounds::Fixed(Bounds {
|
WindowOptions {
|
||||||
origin: Default::default(),
|
bounds: WindowBounds::Fixed(Bounds {
|
||||||
size: size(px(1700.), px(980.)).into(),
|
origin: Default::default(),
|
||||||
}),
|
size: size(px(1700.), px(980.)).into(),
|
||||||
..Default::default()
|
}),
|
||||||
},
|
..Default::default()
|
||||||
move |cx| {
|
},
|
||||||
view(
|
move |cx| {
|
||||||
cx.entity(|cx| {
|
view(
|
||||||
cx.with_global(theme.clone(), |cx| {
|
cx.entity(|cx| {
|
||||||
StoryWrapper::new(selector.story(cx), theme)
|
cx.with_global(theme.clone(), |cx| {
|
||||||
})
|
StoryWrapper::new(selector.story(cx), theme)
|
||||||
}),
|
})
|
||||||
StoryWrapper::render,
|
}),
|
||||||
)
|
StoryWrapper::render,
|
||||||
},
|
)
|
||||||
);
|
},
|
||||||
}
|
);
|
||||||
None => {
|
|
||||||
let window = cx.open_window(
|
|
||||||
WindowOptions {
|
|
||||||
bounds: WindowBounds::Fixed(Bounds {
|
|
||||||
origin: Default::default(),
|
|
||||||
size: size(px(800.), px(600.)).into(),
|
|
||||||
}),
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
|cx| workspace(cx),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
cx.activate(true);
|
cx.activate(true);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue