Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add a `Toast` in the bottom-right corner

Marshall Bowersf73708d72540
diff --git a/crates/ui2/src/components/workspace.rs b/crates/ui2/src/components/workspace.rs
index 8b4329363af..4b20aa165e5 100644
--- a/crates/ui2/src/components/workspace.rs
+++ b/crates/ui2/src/components/workspace.rs
@@ -183,7 +183,12 @@ impl<S: 'static + Send + Sync + Clone> WorkspaceElement<S> {
.child(StatusBar::new())
.child(Toast::new(
ToastOrigin::Bottom,
- |_, _| vec![Label::new("label").into_any()],
+ |_, _| vec![Label::new("A toast").into_any()],
+ Box::new(()),
+ ))
+ .child(Toast::new(
+ ToastOrigin::BottomRight,
+ |_, _| vec![Label::new("Another toast").into_any()],
Box::new(()),
))
}