Toast
A short notice after an action.
Example
Show code
use crate::data::pretend_save;
use zeyn::prelude::*;
pub fn overview(_ctx: &Ctx) -> Node {
Row::new()
.compact()
.col(ActionButton::new("Save", pretend_save, ()).on_success(|_, ui| ui.notify(Toast::success("Saved."))))
.col(
ActionButton::new("Warn", pretend_save, ())
.on_success(|_, ui| ui.notify(Toast::warning("Check the address."))),
)
.into()
}