import { gapTrend, sparklinePoints } from '../../lib/gapHistory' interface Props { samples: number[] | undefined width?: number height?: number } export function GapSparkline({ samples, width = 56, height = 14 }: Props) { if (!samples || samples.length < 2) { return · } const trend = gapTrend(samples) const points = sparklinePoints(samples, width, height) return ( {trend === 'closing' && ( )} {trend === 'opening' && ( )} ) }