Initial commit

This commit is contained in:
alphafetus committed 2025-05-04 23:54:49 -04:00
commit 6e462754c1
23 files changed
+4435

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
use leptos::prelude::*;
#[component]
pub fn ActionButton(
#[prop(optional, default = String::from("button"))]
button_type: String,
#[prop(optional, default = RwSignal::new(false))]
disabled: RwSignal<bool>,
children: Children,
) -> impl IntoView {
view! {
<button
class="m-3 p-3 rounded-lg text-white"
class=(["bg-red-700", "hover:bg-red-800"], move || !disabled.get())
class=("bg-gray-600", move || disabled.get())
r#type=button_type
disabled=move || disabled.get()
>
{ children() }
</button>
}
}