Add View::update which provides a ViewContext
This commit is contained in:
parent
8e3314e680
commit
a1c3826858
17 changed files with 403 additions and 247 deletions
|
@ -1,4 +1,4 @@
|
|||
use gpui2::{div, view, white, Context, ParentElement, Styled, View, WindowContext};
|
||||
use gpui2::{div, white, ParentElement, Styled, View, VisualContext, WindowContext};
|
||||
|
||||
pub struct TextStory {
|
||||
text: View<()>,
|
||||
|
@ -6,7 +6,7 @@ pub struct TextStory {
|
|||
|
||||
impl TextStory {
|
||||
pub fn view(cx: &mut WindowContext) -> View<()> {
|
||||
view(cx.entity(|cx| ()), |_, cx| {
|
||||
cx.build_view(|cx| (), |_, cx| {
|
||||
div()
|
||||
.size_full()
|
||||
.bg(white())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue