fixed use_clipboard usage example

This commit is contained in:
Maccesch 2024-02-13 23:21:20 +00:00
parent 90b954c654
commit 318cf15c87

View file

@ -32,7 +32,10 @@ use leptos::*;
/// when=is_supported
/// fallback=move || view! { <p>Your browser does not support Clipboard API</p> }
/// >
/// <button on:click=move |_| copy("Hello!")>
/// <button on:click={
/// let copy = copy.clone();
/// move |_| copy("Hello!")
/// }>
/// <Show when=copied fallback=move || "Copy">
/// "Copied!"
/// </Show>