Render stories as View
s
This commit is contained in:
parent
c90d976d7a
commit
fc94c4ea40
5 changed files with 140 additions and 61 deletions
|
@ -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