summary refs log tree commit diff stats
path: root/src/components/banner.rs
blob: 3244a07ee6a5e44bbced76105decf29a2a2dd2dc (plain) (blame)
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> }
}