Add a Toast in the bottom-right corner

This commit is contained in:
Marshall Bowers 2023-10-09 13:32:19 -04:00
parent d3c79c7078
commit f73708d725

View file

@ -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(()),
))
}