mirror of
https://github.com/adoyle0/thaw.git
synced 2025-02-02 08:34:15 -05:00
fix: Toast cfg in ssr mode (#144)
This commit is contained in:
parent
dc1f9842a2
commit
a0654a789d
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ pub struct ToastOptions {
|
|||
|
||||
pub fn show_toast(options: ToastOptions) {
|
||||
mount_style("toast", include_str!("./toast.css"));
|
||||
cfg_if! { if #[cfg(target_arch = "wasm32")] {
|
||||
cfg_if! { if #[cfg(all(target_arch = "wasm32", any(feature = "csr", feature = "hydrate")))] {
|
||||
use leptos::{leptos_dom::Mountable, *};
|
||||
let mount = document().body().expect("body element to exist");
|
||||
let children = view! { <div class="thaw-toast">{options.message}</div> };
|
||||
|
|
Loading…
Add table
Reference in a new issue