Skip to content

Commit

Permalink
[charts] Improve themeAugmentation typing (#13433)
Browse files Browse the repository at this point in the history
  • Loading branch information
noraleonte authored Jun 10, 2024
1 parent 8e935d6 commit ece9ce0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/x-charts/src/themeAugmentation/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ComponentsProps, ComponentsOverrides } from '@mui/material/styles';

export interface ChartsComponents {
export interface ChartsComponents<Theme = unknown> {
MuiChartsAxis?: {
defaultProps?: ComponentsProps['MuiChartsAxis'];
styleOverrides?: ComponentsOverrides['MuiChartsAxis'];
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsAxis'];
};
MuiChartsXAxis?: {
defaultProps?: ComponentsProps['MuiChartsXAxis'];
Expand All @@ -13,22 +13,22 @@ export interface ChartsComponents {
};
MuiChartsAxisHighlight?: {
defaultProps?: ComponentsProps['MuiChartsAxisHighlight'];
styleOverrides?: ComponentsOverrides['MuiChartsAxisHighlight'];
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsAxisHighlight'];
};
MuiChartsClipPath?: {
defaultProps?: ComponentsProps['MuiChartsClipPath'];
};
MuiChartsGrid?: {
defaultProps?: ComponentsProps['MuiChartsGrid'];
styleOverrides?: ComponentsOverrides['MuiChartsGrid'];
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsGrid'];
};
MuiChartsLegend?: {
defaultProps?: ComponentsProps['MuiChartsLegend'];
styleOverrides?: ComponentsOverrides['MuiChartsLegend'];
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsLegend'];
};
MuiChartsTooltip?: {
defaultProps?: ComponentsProps['MuiChartsTooltip'];
styleOverrides?: ComponentsOverrides['MuiChartsTooltip'];
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsTooltip'];
};
MuiChartsSurface?: {
defaultProps?: ComponentsProps['MuiChartsSurface'];
Expand All @@ -38,26 +38,26 @@ export interface ChartsComponents {
};
MuiBarElement?: {
defaultProps?: ComponentsProps['MuiBarElement'];
styleOverrides?: ComponentsOverrides['MuiBarElement'];
styleOverrides?: ComponentsOverrides<Theme>['MuiBarElement'];
};
MuiBarLabel?: {
defaultProps?: ComponentsProps['MuiBarLabel'];
styleOverrides?: ComponentsOverrides['MuiBarLabel'];
styleOverrides?: ComponentsOverrides<Theme>['MuiBarLabel'];
};
MuiLineChart?: {
defaultProps?: ComponentsProps['MuiLineChart'];
};
MuiAreaElement?: {
defaultProps?: ComponentsProps['MuiAreaElement'];
styleOverrides?: ComponentsOverrides['MuiAreaElement'];
styleOverrides?: ComponentsOverrides<Theme>['MuiAreaElement'];
};
MuiLineElement?: {
defaultProps?: ComponentsProps['MuiLineElement'];
styleOverrides?: ComponentsOverrides['MuiLineElement'];
styleOverrides?: ComponentsOverrides<Theme>['MuiLineElement'];
};
MuiMarkElement?: {
defaultProps?: ComponentsProps['MuiMarkElement'];
styleOverrides?: ComponentsOverrides['MuiMarkElement'];
styleOverrides?: ComponentsOverrides<Theme>['MuiMarkElement'];
};
MuiScatterChart?: {
defaultProps?: ComponentsProps['MuiScatterChart'];
Expand All @@ -68,5 +68,5 @@ export interface ChartsComponents {
}

declare module '@mui/material/styles' {
interface Components extends ChartsComponents {}
interface Components<Theme = unknown> extends ChartsComponents<Theme> {}
}

0 comments on commit ece9ce0

Please sign in to comment.