Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add example NotificationToast to workspace
Nate Butlere902d5d917ac
diff --git a/crates/ui2/src/components/workspace.rs b/crates/ui2/src/components/workspace.rsindex bcd7d406732..6db5345aa81 100644--- a/crates/ui2/src/components/workspace.rs+++ b/crates/ui2/src/components/workspace.rs@@ -268,10 +268,10 @@ impl Workspace {.child(Toast::new(ToastOrigin::Bottom).child(Label::new("A toast")))// .child(Toast::new(ToastOrigin::BottomRight).child(Label::new("Another toast"))).child(NotificationToast::new(- "A notification",- "This is a notification",- Button::new("Primary"),- ))+ "Can't pull changes from origin",+ "Your local branch is behind the remote branch. Please pull the latest changes before pushing.",+ Button::new("Stash & Switch").variant(ButtonVariant::Filled),+ ).secondary_action(Button::new("Cancel")))}}