1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use dioxus::prelude::*;
#[allow(non_snake_case)]
#[inline_props]
pub fn PfBadge<'a>(cx: Scope<'a>, children: Element<'a>, read:Option<bool>) -> Element {
let read = read.unwrap_or(false);
let css = if read {
"pf-c-badge pf-m-read"
} else {
"pf-c-badge pf-m-unread"
};
cx.render(rsx! {
span{ class:"{css}", children}
})
}