import type { Meta, StoryObj } from '@storybook/react' import { Activity, Cpu, DollarSign, HardDrive, Terminal, Users, Zap } from 'lucide-react' import { StatCard } from './stat-card' const meta: Meta = { title: 'Primitives/StatCard', component: StatCard, parameters: { layout: 'centered', backgrounds: { default: 'dark' } }, } export default meta type Story = StoryObj export const Default: Story = { args: { title: 'Active Sessions', value: 24, subtitle: 'across 3 regions', icon: , }, } export const SandboxVariant: Story = { name: 'Sandbox Variant', args: { variant: 'sandbox', title: 'Active Sessions', value: 24, subtitle: 'across 3 regions', icon: , trend: { value: 12, label: 'vs last hour' }, }, } export const CpuUsage: Story = { name: 'CPU Usage', args: { title: 'Avg CPU Usage', value: '68%', subtitle: 'p95: 94%', icon: , trend: { value: -4, label: 'vs yesterday' }, }, } export const MemoryUsage: Story = { name: 'Memory Usage', args: { title: 'Memory Allocated', value: '12.4 GB', subtitle: 'of 32 GB pool', icon: , trend: { value: 8, label: 'vs last hour' }, }, } export const MonthlyCost: Story = { name: 'Monthly Cost', args: { title: 'Estimated Cost', value: '$142.80', subtitle: 'current billing cycle', icon: , trend: { value: 0, label: 'vs last month' }, }, } export const TrendPositive: Story = { name: 'Trend — Positive', args: { title: 'Sessions Today', value: 1284, icon: , trend: { value: 23, label: 'vs yesterday' }, }, } export const TrendNegative: Story = { name: 'Trend — Negative', args: { title: 'Error Rate', value: '1.2%', icon: , trend: { value: -18, label: 'vs last week' }, }, } export const InfraGrid: Story = { name: 'Infrastructure Grid', render: () => (
} trend={{ value: 12, label: 'vs last hour' }} /> } trend={{ value: -4, label: 'vs yesterday' }} /> } trend={{ value: 8, label: 'vs last hour' }} /> } trend={{ value: 3, label: 'vs last month' }} /> } trend={{ value: 19, label: 'MoM' }} /> } trend={{ value: -11, label: 'vs last week' }} />
), }