Skip to content

Commit

Permalink
[charts] Fix typescript error when using sx property on ChartsToolt…
Browse files Browse the repository at this point in the history
…ip (#12659)
  • Loading branch information
JCQuintas committed Apr 4, 2024
1 parent 38022a0 commit d533964
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/x-charts/src/ChartsTooltip/ChartsTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import composeClasses from '@mui/utils/composeClasses';
import { styled, useThemeProps } from '@mui/material/styles';
import { Popper, PopperProps } from '@mui/base/Popper';
import { styled, useThemeProps, SxProps, Theme } from '@mui/material/styles';
import { Popper, PopperProps as BasePopperProps } from '@mui/base/Popper';
import { NoSsr } from '@mui/base/NoSsr';
import { useSlotProps } from '@mui/base/utils';
import {
Expand All @@ -21,6 +21,13 @@ import { ChartsItemContentProps, ChartsItemTooltipContent } from './ChartsItemTo
import { ChartsAxisContentProps, ChartsAxisTooltipContent } from './ChartsAxisTooltipContent';
import { ChartsTooltipClasses, getChartsTooltipUtilityClass } from './chartsTooltipClasses';

export type PopperProps = BasePopperProps & {
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
};

export interface ChartsTooltipSlots {
/**
* Custom component for the tooltip popper.
Expand Down
1 change: 1 addition & 0 deletions scripts/x-charts.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
{ "name": "PiePlotSlots", "kind": "Interface" },
{ "name": "PieSeriesType", "kind": "Interface" },
{ "name": "PieValueType", "kind": "TypeAlias" },
{ "name": "PopperProps", "kind": "TypeAlias" },
{ "name": "referenceLineClasses", "kind": "Variable" },
{ "name": "ResponsiveChartContainer", "kind": "Variable" },
{ "name": "ResponsiveChartContainerProps", "kind": "Interface" },
Expand Down

0 comments on commit d533964

Please sign in to comment.