Render stories as View
s
This commit is contained in:
parent
c90d976d7a
commit
fc94c4ea40
5 changed files with 140 additions and 61 deletions
|
@ -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(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue