From 8f9e32c8c27f46c6038691b392dab5c4597c7b3d Mon Sep 17 00:00:00 2001 From: Matt Vickers Date: Fri, 13 Sep 2024 12:20:53 -0500 Subject: [PATCH] Fix scrollContainer type --- packages/polaris-viz-core/src/contexts/ChartContext.tsx | 2 +- packages/polaris-viz/src/components/BarChart/BarChart.tsx | 2 +- .../src/components/ChartContainer/ChartContainer.tsx | 2 +- .../components/ChartDimensions/ChartDimensions.tsx | 2 +- packages/polaris-viz/src/components/LineChart/LineChart.tsx | 2 +- .../LineChart/utilities/getAlteredLineChartPosition.ts | 2 +- .../src/components/StackedAreaChart/StackedAreaChart.tsx | 2 +- packages/polaris-viz/src/components/TooltipWrapper/utilities.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/polaris-viz-core/src/contexts/ChartContext.tsx b/packages/polaris-viz-core/src/contexts/ChartContext.tsx index 8baa0dadd..b7c169636 100644 --- a/packages/polaris-viz-core/src/contexts/ChartContext.tsx +++ b/packages/polaris-viz-core/src/contexts/ChartContext.tsx @@ -10,7 +10,7 @@ export interface ChartContextValues { shouldAnimate: boolean; theme: string; isPerformanceImpacted: boolean; - scrollContainer?: HTMLElement | null; + scrollContainer?: Element | null; } export const ChartContext = createContext({ diff --git a/packages/polaris-viz/src/components/BarChart/BarChart.tsx b/packages/polaris-viz/src/components/BarChart/BarChart.tsx index 7fd4629dd..ddf3d0291 100644 --- a/packages/polaris-viz/src/components/BarChart/BarChart.tsx +++ b/packages/polaris-viz/src/components/BarChart/BarChart.tsx @@ -51,7 +51,7 @@ export type BarChartProps = { yAxisOptions?: Partial; renderHiddenLegendLabel?: (count: number) => string; renderBucketLegendLabel?: () => string; - scrollContainer?: HTMLElement | null; + scrollContainer?: Element | null; } & ChartProps; export function BarChart(props: BarChartProps) { diff --git a/packages/polaris-viz/src/components/ChartContainer/ChartContainer.tsx b/packages/polaris-viz/src/components/ChartContainer/ChartContainer.tsx index 1b25553b8..2f29899ca 100644 --- a/packages/polaris-viz/src/components/ChartContainer/ChartContainer.tsx +++ b/packages/polaris-viz/src/components/ChartContainer/ChartContainer.tsx @@ -28,7 +28,7 @@ interface Props { isAnimated: boolean; theme: string; onError?: ErrorBoundaryResponse; - scrollContainer?: HTMLElement | null; + scrollContainer?: Element | null; sparkChart?: boolean; skeletonType?: SkeletonType; type?: InternalChartType; diff --git a/packages/polaris-viz/src/components/ChartContainer/components/ChartDimensions/ChartDimensions.tsx b/packages/polaris-viz/src/components/ChartContainer/components/ChartDimensions/ChartDimensions.tsx index 52879edf4..e9bba0ced 100644 --- a/packages/polaris-viz/src/components/ChartContainer/components/ChartDimensions/ChartDimensions.tsx +++ b/packages/polaris-viz/src/components/ChartContainer/components/ChartDimensions/ChartDimensions.tsx @@ -24,7 +24,7 @@ interface ChartDimensionsProps { children: ReactElement; data: DataSeries[] | DataGroup[]; onIsPrintingChange: Dispatch>; - scrollContainer?: HTMLElement | null; + scrollContainer?: Element | null; sparkChart?: boolean; skeletonType?: SkeletonType; onError?: ErrorBoundaryResponse; diff --git a/packages/polaris-viz/src/components/LineChart/LineChart.tsx b/packages/polaris-viz/src/components/LineChart/LineChart.tsx index ba4db580f..731017df9 100644 --- a/packages/polaris-viz/src/components/LineChart/LineChart.tsx +++ b/packages/polaris-viz/src/components/LineChart/LineChart.tsx @@ -51,7 +51,7 @@ export type LineChartProps = { slots?: { chart?: (props: LineChartSlotProps) => JSX.Element; }; - scrollContainer?: HTMLElement | null; + scrollContainer?: Element | null; } & ChartProps; export function LineChart(props: LineChartProps) { diff --git a/packages/polaris-viz/src/components/LineChart/utilities/getAlteredLineChartPosition.ts b/packages/polaris-viz/src/components/LineChart/utilities/getAlteredLineChartPosition.ts index b0d67a59d..6ff2553eb 100644 --- a/packages/polaris-viz/src/components/LineChart/utilities/getAlteredLineChartPosition.ts +++ b/packages/polaris-viz/src/components/LineChart/utilities/getAlteredLineChartPosition.ts @@ -17,7 +17,7 @@ export interface AlteredPositionProps { margin: Margin; position: TooltipPositionOffset; tooltipDimensions: Dimensions; - scrollContainer?: HTMLElement | null; + scrollContainer?: Element | null; } export interface AlteredPositionReturn { diff --git a/packages/polaris-viz/src/components/StackedAreaChart/StackedAreaChart.tsx b/packages/polaris-viz/src/components/StackedAreaChart/StackedAreaChart.tsx index dbf6f629e..6a6bb658c 100644 --- a/packages/polaris-viz/src/components/StackedAreaChart/StackedAreaChart.tsx +++ b/packages/polaris-viz/src/components/StackedAreaChart/StackedAreaChart.tsx @@ -43,7 +43,7 @@ export type StackedAreaChartProps = { yAxisOptions?: Partial; renderHiddenLegendLabel?: (count: number) => string; seriesNameFormatter?: LabelFormatter; - scrollContainer?: HTMLElement | null; + scrollContainer?: Element | null; } & ChartProps; export function StackedAreaChart(props: StackedAreaChartProps) { diff --git a/packages/polaris-viz/src/components/TooltipWrapper/utilities.ts b/packages/polaris-viz/src/components/TooltipWrapper/utilities.ts index 1ab02e22e..da5778428 100644 --- a/packages/polaris-viz/src/components/TooltipWrapper/utilities.ts +++ b/packages/polaris-viz/src/components/TooltipWrapper/utilities.ts @@ -20,7 +20,7 @@ export interface AlteredPositionProps { position: TooltipPositionOffset; tooltipDimensions: Dimensions; chartDimensions?: BoundingRect; - scrollContainer?: HTMLElement | null; + scrollContainer?: Element | null; } export interface AlteredPositionReturn {