Skip to content

Commit

Permalink
fix: ChartConfigProvider allow multiple elements as children (#31)
Browse files Browse the repository at this point in the history
Before this change, only one child element was permitted inside
ChartConfigProvider. We want to allow multiple sibling elements too.
  • Loading branch information
davidlougheed authored Sep 18, 2024
2 parents ddac442 + 710ad26 commit 909f256
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ChartConfigProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useContext } from 'react';
import type { ReactNode } from 'react';

import { DEFAULT_CHART_THEME, defaultTranslationObject } from './constants/chartConstants';
import type { ChartTheme, LngDictionary, SupportedLng, TranslationObject } from './types/chartTypes';
Expand Down Expand Up @@ -63,7 +64,7 @@ type ChartConfigProviderProps = {
theme?: ChartTheme;
Lng: string;
translationMap?: TranslationObject;
children: React.ReactElement;
children: ReactNode;
globalThreshold?: number;
maxLabelChars?: number;
};
Expand Down

0 comments on commit 909f256

Please sign in to comment.