use leptos::prelude::*; #[component] pub fn StatCardClient( label: String, value: String, change: Option, trend_positive: bool, icon: Option, class: &'static str, ) -> impl IntoView { let trend_color = if trend_positive { "text-green-400" } else { "text-red-400" }; view! {

{label}

{value}

{change.map(|ch| { view! {

{ch}

} })}
{icon.map(|icon_fn| { view! {
{icon_fn()}
} })}
} }