From 027225c2bb58828097800c9552d856ee445900b8 Mon Sep 17 00:00:00 2001 From: Siriwat K Date: Tue, 3 Sep 2024 02:50:00 +0700 Subject: [PATCH] [typescript] Fix missing `Theme` generic (#43523) --- packages/mui-material/src/Popover/Popover.spec.tsx | 9 +++++++++ packages/mui-material/src/utils/types.ts | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) 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() { ); } + + ({ 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; }; export type SlotProps<