mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-23 14:29:22 -05:00
14 lines
No EOL
250 B
Markdown
14 lines
No EOL
250 B
Markdown
# Toast
|
|
|
|
```rust demo
|
|
let toaster = ToasterInjection::use_();
|
|
|
|
let on_click = move |_| {
|
|
toaster.dispatch_toast(view! { <span>"Hello"</span> }.into_any(), Default::default());
|
|
};
|
|
|
|
view! {
|
|
<Button on_click=on_click>"Make toast"</Button>
|
|
}
|
|
|
|
``` |