Render stories as Views
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
|
||||
use gpui3::{relative, rems, Size};
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use gpui3::AnyElement;
|
||||
use smallvec::SmallVec;
|
||||
|
||||
|
||||
@@ -329,12 +329,14 @@ mod stories {
|
||||
workspace: View<Workspace>,
|
||||
}
|
||||
|
||||
pub fn workspace_story(cx: &mut WindowContext) -> View<WorkspaceStory> {
|
||||
view(
|
||||
cx.entity(|cx| WorkspaceStory {
|
||||
workspace: workspace(cx),
|
||||
}),
|
||||
|view, cx| view.workspace.clone(),
|
||||
)
|
||||
impl WorkspaceStory {
|
||||
pub fn view(cx: &mut WindowContext) -> View<Self> {
|
||||
view(
|
||||
cx.entity(|cx| Self {
|
||||
workspace: workspace(cx),
|
||||
}),
|
||||
|view, cx| view.workspace.clone(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user