diff --git a/packages/mui-material/src/Popover/Popover.spec.tsx b/packages/mui-material/src/Popover/Popover.spec.tsx index e771e801c80d83..823d9bb661f5df 100644 --- a/packages/mui-material/src/Popover/Popover.spec.tsx +++ b/packages/mui-material/src/Popover/Popover.spec.tsx @@ -16,3 +16,12 @@ function Test() { </React.Fragment> ); } + +<Popover + open + slotProps={{ + paper: { + sx: (theme) => ({ backgroundColor: theme.palette.primary.main }), + }, + }} +/>; diff --git a/packages/mui-material/src/utils/types.ts b/packages/mui-material/src/utils/types.ts index 01d4a1be52612c..caa6f2b606339b 100644 --- a/packages/mui-material/src/utils/types.ts +++ b/packages/mui-material/src/utils/types.ts @@ -1,5 +1,6 @@ import { SxProps } from '@mui/system'; import { SlotComponentProps } from '@mui/utils'; +import { Theme } from '../styles'; export type { EventHandlers, @@ -10,7 +11,7 @@ export type { export type SlotCommonProps = { component?: React.ElementType; - sx?: SxProps; + sx?: SxProps<Theme>; }; export type SlotProps<