use leptos::prelude::*; /// # Header Component /// /// A simple header that may also contain a description. Should be used to annotate sections and /// forms, with extra information about how that section/form will work. /// /// Example usage: /// ``` /// view! { ///
/// } /// ``` #[component] pub fn Header( /// The title of the header. Must always be present. #[prop(into)] title: Signal, /// The description of the header. Hidden when nothing i s #[prop(optional, into)] description: Signal, ) -> impl IntoView { let show_description = Signal::derive(move || { !description.get().is_empty() }); view! {
{title}
{description}
} }