use crate::utils::mount_style::mount_style; use leptos::*; use std::time::Duration; use web_sys::Element; pub struct ToastOptions { pub message: String, pub duration: Duration, } pub fn show_toast(options: ToastOptions) { mount_style("toast", include_str!("./toast.css")); let parent = Element::from(document().body().expect("body element not to exist")); let children = view! {