leptos-template

This commit is contained in:
John Lancaster
2025-09-12 18:07:36 -05:00
parent a680007ab9
commit 09582a2efb
19 changed files with 2587 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
use leptos::prelude::*;
/// A parameterized incrementing button
#[component]
pub fn Button(#[prop(default = 1)] increment: i32) -> impl IntoView {
let (count, set_count) = signal(0);
view! {
<button on:click=move |_| {
set_count.set(count.get() + increment)
}>
"Click me: " {count}
</button>
}
}

1
src/components/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod counter_btn;