1 2 3 4 5 6 7 8 9 10 11 12 13
use leptos::{ IntoView, component, prelude::{ClassAttribute, ElementChild}, view, }; #[component] pub fn Banner<T>(mut text: T) -> impl IntoView where T: FnMut() -> String + Send + 'static, { view! { <p class="text-white rounded-lg m-2 p-2 bg-red-600">{move || text()}</p> } }