Skip to content

Commit

Permalink
Removed withChartTheme HOC
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Nov 2, 2023
1 parent 1938eea commit a310d9c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 69 deletions.
68 changes: 0 additions & 68 deletions packages/chart/src/ChartThemeProviderUtils.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/chart/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export { default as MockChartModel } from './MockChartModel';
export { default as Plot } from './plotly/Plot';
export * from './ChartTheme';
export * from './ChartThemeProvider';
export * from './ChartThemeProviderUtils';
export { default as isFigureChartModel } from './isFigureChartModel';
export * from './useChartTheme';
15 changes: 15 additions & 0 deletions packages/chart/src/useChartTheme.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { useContext } from 'react';

import {
ChartThemeContext,
ChartThemeContextValue,
} from './ChartThemeProvider';

/**
* Hook to get the current `ChartThemeContextValue`.
*/
export function useChartTheme(): ChartThemeContextValue | null {
return useContext(ChartThemeContext);
}

export default useChartTheme;

0 comments on commit a310d9c

Please sign in to comment.