From 2a834f4ddf06fc95f8712d2a5d5638583e38494e Mon Sep 17 00:00:00 2001 From: annacmc Date: Fri, 20 Dec 2024 23:39:43 +1100 Subject: [PATCH] Define GridVisibility type locally in GridControl component. --- .../charts/src/components/grid-control/grid-control.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/js-packages/charts/src/components/grid-control/grid-control.tsx b/projects/js-packages/charts/src/components/grid-control/grid-control.tsx index 0c6b402212d1c..5148618bb9a2e 100644 --- a/projects/js-packages/charts/src/components/grid-control/grid-control.tsx +++ b/projects/js-packages/charts/src/components/grid-control/grid-control.tsx @@ -3,10 +3,13 @@ import { scaleLinear } from '@visx/scale'; import React from 'react'; import type { BaseChartProps } from '../shared/types'; +// Define a type for grid visibility options +type GridVisibility = 'x' | 'y' | 'xy' | 'none'; + interface GridControlProps extends BaseChartProps { xScale: ReturnType< typeof scaleLinear >; yScale: ReturnType< typeof scaleLinear >; - gridVisibility?: 'x' | 'y' | 'xy' | 'none'; + gridVisibility?: GridVisibility; top?: number; }