import React from 'react'; import { G, Line } from 'react-native-svg'; import { colors } from '../../styles'; import { ScaleFunction } from './graph-types'; interface CustomGridProps { y: ScaleFunction; ticks: Array; } export const CustomGrid: React.FC = ({ y, ticks }) => { const [firstTick, ...remainingTicks] = ticks; const dashArray = [1, 3]; const strokeSolidWidth = 0.2; const strokeSolidColor = colors.bgBlack; const strokeDashWidth = 1; const strokeDashColor = colors.lightGrey; const renderLine = (tick: number, stroke: string, strokeWidth: number, dashArray?: number[]) => ( ); return ( {renderLine(firstTick, strokeSolidColor, strokeSolidWidth)} {remainingTicks.map((tick) => renderLine(tick, strokeDashColor, strokeDashWidth, dashArray))} ); };