Zeyn components
Drop down and split buttons with actions.
use crate::data::{count_products, pretend_save}; use zeyn::prelude::*; pub fn overview(_ctx: &Ctx) -> Node { MenuButton::new("More") .action_then("Count products", count_products, (), |n, ui| { if let Ok(n) = n { ui.toast(format!("{n} products")); } }) .separator() .action_then("Archive", pretend_save, (), |_, ui| ui.toast("Archived. Nothing was stored.")) .confirm("Archive the selection?") .into() }