diff --git a/Cargo.toml b/Cargo.toml index c708c4a..1faf025 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,6 @@ license = "MIT" [dependencies] leptos = { version = "0.5.0", features = ["csr"] } -stylers = "0.3.2" web-sys = { version = "0.3.62", features = ["DomRect"] } leptos_dom = { version = "0.5.0" } wasm-bindgen = "0.2.85" diff --git a/gh-pages/src/components/demo.rs b/gh-pages/src/components/demo.rs index 0620126..adbb6d0 100644 --- a/gh-pages/src/components/demo.rs +++ b/gh-pages/src/components/demo.rs @@ -10,7 +10,7 @@ pub struct DemoCode { #[component] pub fn Demo(demo_code: DemoCode, children: Children) -> impl IntoView { - mount_style("demo", || ("", prisms::prism_css!())); + mount_style("demo", prisms::prism_css!()); view! {
{ children() } diff --git a/src/button/mod.rs b/src/button/mod.rs index 83e265c..9a43c15 100644 --- a/src/button/mod.rs +++ b/src/button/mod.rs @@ -1,7 +1,7 @@ mod theme; + use crate::{components::*, icon::*, theme::*, utils::mount_style::mount_style}; use leptos::*; -use stylers::style_sheet_str; pub use theme::ButtonTheme; #[derive(Default, PartialEq, Clone, Copy)] @@ -84,7 +84,7 @@ pub fn Button( css_vars }); - let class_name = mount_style("button", || style_sheet_str!("./src/button/button.css")); + mount_style("button", include_str!("./button.css")); let icon_style = if children.is_some() { "margin-right: 6px" @@ -110,7 +110,7 @@ pub fn Button( callback.call(event); }; - view! {class=class_name, + view! {