dioxus-toast 0.3.0

Add toast support in your dioxus project
docs.rs failed to build dioxus-toast-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: dioxus-toast-0.2.0
use dioxus::prelude::*;
use fermi::{AtomRef, use_atom_ref, use_init_atom_root};
use dioxus_toast::{ToastInfo, ToastManager};

fn main() {
    dioxus_desktop::launch(app)
}

static TOAST_MANAGER: AtomRef<ToastManager> = |_| ToastManager::default();

fn app(cx: Scope) -> Element {

    use_init_atom_root(&cx);

    std::panic::set_hook(Box::new(|info| {
        println!("Panic: {}", info);
    }));

    let toast = use_atom_ref(&cx, TOAST_MANAGER);

    cx.render(rsx! {
        dioxus_toast::ToastFrame {
            manager: toast
        }
        div {
            button {
                onclick: move |_| {
                    let _id = toast.write().popup(ToastInfo::simple("hello world"));
                    println!("New Toast ID: {}", _id);
                },
                "Normal Toast"
            }
            button {
                onclick: move |_| {
                    let _id = toast.write().popup(ToastInfo::success("Hello World!", "Success"));
                    println!("New Toast ID: {}", _id);  
                },
                "Success Toast"
            }
            button {
                onclick: move |_| {
                    let _id = toast.write().popup(ToastInfo {
                        heading: Some("top-right".into()),
                        context: "Top Right Toast".into(),
                        allow_toast_close: true,
                        position: dioxus_toast::Position::TopRight,
                        icon: None,
                        hide_after: None
                    });
                },
                "Top Right"
            }
        }
    })
}