Skip to content

Commit

Permalink
Fix scrollContainer type
Browse files Browse the repository at this point in the history
  • Loading branch information
envex committed Sep 13, 2024
1 parent d4a0020 commit 8f9e32c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/polaris-viz-core/src/contexts/ChartContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface ChartContextValues {
shouldAnimate: boolean;
theme: string;
isPerformanceImpacted: boolean;
scrollContainer?: HTMLElement | null;
scrollContainer?: Element | null;
}

export const ChartContext = createContext<ChartContextValues>({
Expand Down
2 changes: 1 addition & 1 deletion packages/polaris-viz/src/components/BarChart/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export type BarChartProps = {
yAxisOptions?: Partial<YAxisOptions>;
renderHiddenLegendLabel?: (count: number) => string;
renderBucketLegendLabel?: () => string;
scrollContainer?: HTMLElement | null;
scrollContainer?: Element | null;
} & ChartProps;

export function BarChart(props: BarChartProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface Props {
isAnimated: boolean;
theme: string;
onError?: ErrorBoundaryResponse;
scrollContainer?: HTMLElement | null;
scrollContainer?: Element | null;
sparkChart?: boolean;
skeletonType?: SkeletonType;
type?: InternalChartType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface ChartDimensionsProps {
children: ReactElement;
data: DataSeries[] | DataGroup[];
onIsPrintingChange: Dispatch<SetStateAction<boolean>>;
scrollContainer?: HTMLElement | null;
scrollContainer?: Element | null;
sparkChart?: boolean;
skeletonType?: SkeletonType;
onError?: ErrorBoundaryResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface AlteredPositionProps {
margin: Margin;
position: TooltipPositionOffset;
tooltipDimensions: Dimensions;
scrollContainer?: HTMLElement | null;
scrollContainer?: Element | null;
}

export interface AlteredPositionReturn {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type StackedAreaChartProps = {
yAxisOptions?: Partial<YAxisOptions>;
renderHiddenLegendLabel?: (count: number) => string;
seriesNameFormatter?: LabelFormatter;
scrollContainer?: HTMLElement | null;
scrollContainer?: Element | null;
} & ChartProps;

export function StackedAreaChart(props: StackedAreaChartProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface AlteredPositionProps {
position: TooltipPositionOffset;
tooltipDimensions: Dimensions;
chartDimensions?: BoundingRect;
scrollContainer?: HTMLElement | null;
scrollContainer?: Element | null;
}

export interface AlteredPositionReturn {
Expand Down

0 comments on commit 8f9e32c

Please sign in to comment.