From f73708d725401255879df97a58721e5b25fbe817 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 9 Oct 2023 13:32:19 -0400 Subject: [PATCH] Add a `Toast` in the bottom-right corner --- crates/ui2/src/components/workspace.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ui2/src/components/workspace.rs b/crates/ui2/src/components/workspace.rs index 8b4329363af83e6bb40424359c9f782278c8c281..4b20aa165e5f5cf5fdea90839d1b592a10550c79 100644 --- a/crates/ui2/src/components/workspace.rs +++ b/crates/ui2/src/components/workspace.rs @@ -183,7 +183,12 @@ impl WorkspaceElement { .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(()), )) }