Skip to content

Commit

Permalink
[typescript] Fix missing Theme generic (#43523)
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp authored Sep 2, 2024
1 parent 338bf0f commit 027225c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions packages/mui-material/src/Popover/Popover.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ function Test() {
</React.Fragment>
);
}

<Popover
open
slotProps={{
paper: {
sx: (theme) => ({ backgroundColor: theme.palette.primary.main }),
},
}}
/>;
3 changes: 2 additions & 1 deletion packages/mui-material/src/utils/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SxProps } from '@mui/system';
import { SlotComponentProps } from '@mui/utils';
import { Theme } from '../styles';

export type {
EventHandlers,
Expand All @@ -10,7 +11,7 @@ export type {

export type SlotCommonProps = {
component?: React.ElementType;
sx?: SxProps;
sx?: SxProps<Theme>;
};

export type SlotProps<
Expand Down

0 comments on commit 027225c

Please sign in to comment.