leptos_use/docs/
note.rs

1
2
3
4
5
6
7
8
use leptos::*;

#[component]
pub fn Note(#[prop(optional, into)] class: String, children: Children) -> impl IntoView {
    let class = format!("note {class}");

    view! { <div class=class>{children()}</div> }
}