diff --git a/Cargo.toml b/Cargo.toml
index 8b27b9f..d7ea510 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-leptos = { version = "0.5.0", features = ["csr"] }
+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" }
@@ -22,6 +22,7 @@ icondata = { version = "0.0.7", features = [
"AiCloseOutlined",
"AiCheckOutlined",
"AiLeftOutlined",
+ "AiLoadingOutlined",
] }
[workspace]
diff --git a/gh-pages/src/pages/button/mod.rs b/gh-pages/src/pages/button/mod.rs
index aed47be..1a6bdac 100644
--- a/gh-pages/src/pages/button/mod.rs
+++ b/gh-pages/src/pages/button/mod.rs
@@ -92,6 +92,7 @@ pub fn ButtonPage() -> impl IntoView {
""
+
"style"
@@ -108,3 +109,32 @@ pub fn ButtonPage() -> impl IntoView {
}
}
+
+#[component]
+pub fn LoadingButton() -> impl IntoView {
+ let loading = create_rw_signal(false);
+ view! {
+ "loading"
+
+
+
+
+
+
+ "ERROR Color Icon"
+
+
+ }
+ "#, "rust")>
+ ""
+
+
+ }
+}
diff --git a/src/button/button.css b/src/button/button.css
index eeec107..f0691b3 100644
--- a/src/button/button.css
+++ b/src/button/button.css
@@ -43,3 +43,9 @@
padding: 0 10px;
border-radius: 50%;
}
+
+@keyframes meltLoadingCircle {
+ 100% {
+ transform: rotate(360deg);
+ }
+}
diff --git a/src/button/mod.rs b/src/button/mod.rs
index 52acc24..c6f976e 100644
--- a/src/button/mod.rs
+++ b/src/button/mod.rs
@@ -57,6 +57,7 @@ pub fn Button(
#[prop(optional, into)] color: MaybeSignal,
#[prop(optional, into)] round: MaybeSignal,
#[prop(optional, into)] icon: Option,
+ #[prop(optional, into)] loading: MaybeSignal,
#[prop(optional)] children: Option,
) -> impl IntoView {
let theme = use_theme(Theme::light);
@@ -89,7 +90,7 @@ pub fn Button(
""
};
- view! { class=class_name,
+ view! {class=class_name,