Files
the-other-dude/frontend/src/components/monitoring/Sparkline.tsx
Jason Staack b8d8abde32 fix(ui): replace hardcoded chart hex colors with Warm Precision tokens
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:45:52 -05:00

25 lines
568 B
TypeScript

import { LineChart, Line } from 'recharts'
interface SparklineProps {
data: number[]
color?: string
width?: number
height?: number
}
export function Sparkline({ data, color = 'hsl(var(--accent))', width = 60, height = 24 }: SparklineProps) {
const chartData = data.map((v, i) => ({ v, i }))
return (
<LineChart width={width} height={height} data={chartData}>
<Line
type="monotone"
dataKey="v"
stroke={color}
dot={false}
strokeWidth={1.5}
isAnimationActive={false}
/>
</LineChart>
)
}