use leptos::prelude::*; #[cfg(target_arch = "wasm32")] use super::client::StatCardClient; #[cfg(not(target_arch = "wasm32"))] use super::ssr::StatCardSSR; /// Statistics card component /// /// Displays a key metric with optional trend indicator. /// /// # Examples /// /// ```rust /// use leptos::prelude::*; /// use vapora_leptos_ui::StatCard; /// /// #[component] /// fn Dashboard() -> impl IntoView { /// view! { /// /// } /// } /// ``` #[component] pub fn StatCard( /// Label text for the statistic label: String, /// Main value to display value: String, /// Optional change indicator (e.g., "+12%", "-5%") #[prop(optional)] change: Option, /// Whether the change is positive (green) or negative (red) #[prop(default = true)] trend_positive: bool, /// Optional icon or content to display #[prop(optional)] icon: Option, /// Additional CSS classes #[prop(default = "")] class: &'static str, ) -> impl IntoView { #[cfg(not(target_arch = "wasm32"))] return view! { }; #[cfg(target_arch = "wasm32")] return view! { }; }