Files
the-other-dude/frontend/src/components/monitoring/Sparkline.tsx
Jason Staack b840047e19 feat: The Other Dude v9.0.1 — full-featured email system
ci: add GitHub Pages deployment workflow for docs site

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 19:30:44 -05:00

25 lines
557 B
TypeScript

import { LineChart, Line } from 'recharts'
interface SparklineProps {
data: number[]
color?: string
width?: number
height?: number
}
export function Sparkline({ data, color = '#38BDF8', 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>
)
}