use leptos::prelude::*;
use super::{Stat, StatSize, StatTrend, StatAlign, StatHeader, StatBody, StatValue, StatLabel, StatDelta, StatIcon};
#[component]
pub fn BasicExample() -> impl IntoView {
view! {
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem;">
<Stat>
<StatLabel>"Total Revenue"</StatLabel>
<StatValue>"$45,231"</StatValue>
</Stat>
<Stat trend=StatTrend::Increase>
<StatLabel>"Active Users"</StatLabel>
<StatBody>
<StatValue>"2,350"</StatValue>
<StatDelta>"+12%"</StatDelta>
</StatBody>
</Stat>
<Stat trend=StatTrend::Decrease>
<StatLabel>"Bounce Rate"</StatLabel>
<StatBody>
<StatValue>"3.2%"</StatValue>
<StatDelta>"-0.5%"</StatDelta>
</StatBody>
</Stat>
<Stat>
<StatHeader>
<StatIcon>"💰"</StatIcon>
<StatLabel>"Sales"</StatLabel>
</StatHeader>
<StatValue>"$12,234"</StatValue>
</Stat>
<Stat size=StatSize::Sm>
<StatLabel>"Small"</StatLabel>
<StatValue>"123"</StatValue>
</Stat>
<Stat size=StatSize::Lg trend=StatTrend::Increase>
<StatLabel>"Large"</StatLabel>
<StatBody>
<StatValue>"45K"</StatValue>
<StatDelta>"+23%"</StatDelta>
</StatBody>
</Stat>
<Stat align=StatAlign::Center>
<StatLabel>"Centered"</StatLabel>
<StatValue>"999"</StatValue>
</Stat>
<Stat loading=true>
<StatLabel>"Loading..."</StatLabel>
<StatValue>"12345"</StatValue>
</Stat>
<Stat size=StatSize::Lg trend=StatTrend::Increase>
<StatHeader>
<StatIcon>"📈"</StatIcon>
<StatLabel>"Total Growth"</StatLabel>
</StatHeader>
<StatBody>
<StatValue>"$89,432"</StatValue>
<StatDelta>"+18.2%"</StatDelta>
</StatBody>
</Stat>
</div>
}
}