diff --git a/docs/data/material/components/modal/SpringModal.tsx b/docs/data/material/components/modal/SpringModal.tsx index fb9b3687d2f1b1..1d8c7aa0c6ffea 100644 --- a/docs/data/material/components/modal/SpringModal.tsx +++ b/docs/data/material/components/modal/SpringModal.tsx @@ -7,7 +7,7 @@ import Typography from '@mui/material/Typography'; import { useSpring, animated } from '@react-spring/web'; interface FadeProps { - children: React.ReactElement; + children: React.JSX.Element; in?: boolean; onClick?: any; onEnter?: (node: HTMLElement, isAppearing: boolean) => void; diff --git a/docs/src/modules/components/JoyThemeBuilder.tsx b/docs/src/modules/components/JoyThemeBuilder.tsx index 834d439b77594d..24dccfc7b0baf0 100644 --- a/docs/src/modules/components/JoyThemeBuilder.tsx +++ b/docs/src/modules/components/JoyThemeBuilder.tsx @@ -1267,7 +1267,7 @@ function getAvailableTokens(colorSchemes: any, colorMode: 'light' | 'dark') { return tokens; } -function TemplatesDialog({ children, data }: { children: React.ReactElement; data: any }) { +function TemplatesDialog({ children, data }: { children: React.JSX.Element; data: any }) { const [open, setOpen] = React.useState(false); const { map: templateMap } = sourceJoyTemplates(); const renderItem = (name: string, item: TemplateData) => { diff --git a/packages/mui-material/src/ClickAwayListener/ClickAwayListener.tsx b/packages/mui-material/src/ClickAwayListener/ClickAwayListener.tsx index 6a695e84f78352..997ff04fa261dd 100644 --- a/packages/mui-material/src/ClickAwayListener/ClickAwayListener.tsx +++ b/packages/mui-material/src/ClickAwayListener/ClickAwayListener.tsx @@ -36,7 +36,7 @@ export interface ClickAwayListenerProps { /** * The wrapped element. */ - children: React.ReactElement; + children: React.JSX.Element; /** * If `true`, the React tree is ignored and only the DOM tree is considered. * This prop changes how portaled elements are handled. diff --git a/packages/mui-material/src/Modal/useModal.types.ts b/packages/mui-material/src/Modal/useModal.types.ts index a67b240a9c5708..65a51c37894d8f 100644 --- a/packages/mui-material/src/Modal/useModal.types.ts +++ b/packages/mui-material/src/Modal/useModal.types.ts @@ -22,7 +22,7 @@ export type UseModalParameters = { /** * A single child content element. */ - children: React.ReactElement | undefined | null; + children: React.JSX.Element | undefined | null; /** * When set to true the Modal waits until a nested Transition is completed before closing. * @default false diff --git a/packages/mui-material/src/Slider/SliderValueLabel.types.ts b/packages/mui-material/src/Slider/SliderValueLabel.types.ts index 8fac93f872dcb8..3347badcf8f729 100644 --- a/packages/mui-material/src/Slider/SliderValueLabel.types.ts +++ b/packages/mui-material/src/Slider/SliderValueLabel.types.ts @@ -1,5 +1,5 @@ export interface SliderValueLabelProps { - children?: React.ReactElement; + children?: React.JSX.Element; className?: string; style?: React.CSSProperties; /** diff --git a/packages/mui-material/src/Unstable_TrapFocus/FocusTrap.types.ts b/packages/mui-material/src/Unstable_TrapFocus/FocusTrap.types.ts index 462100ec696479..114a3389a04e25 100644 --- a/packages/mui-material/src/Unstable_TrapFocus/FocusTrap.types.ts +++ b/packages/mui-material/src/Unstable_TrapFocus/FocusTrap.types.ts @@ -24,7 +24,7 @@ export interface FocusTrapProps { /** * A single child content element. */ - children: React.ReactElement; + children: React.JSX.Element; /** * If `true`, the focus trap will not automatically shift focus to itself when it opens, and * replace it to the last focused element when it closes. diff --git a/packages/mui-styles/src/ServerStyleSheets/ServerStyleSheets.d.ts b/packages/mui-styles/src/ServerStyleSheets/ServerStyleSheets.d.ts index 24ec50839ed00a..2d51e1bdc39667 100644 --- a/packages/mui-styles/src/ServerStyleSheets/ServerStyleSheets.d.ts +++ b/packages/mui-styles/src/ServerStyleSheets/ServerStyleSheets.d.ts @@ -5,7 +5,7 @@ declare class ServerStyleSheets { constructor(options?: object); collect(children: React.ReactNode, options?: object): React.ReactElement; toString(): string; - getStyleElement(props?: object): React.ReactElement; + getStyleElement(props?: object): React.JSX.Element; } export default ServerStyleSheets; diff --git a/packages/mui-styles/test/styles.spec.tsx b/packages/mui-styles/test/styles.spec.tsx index 8ed6a1d215f263..34ab5cac0f3711 100644 --- a/packages/mui-styles/test/styles.spec.tsx +++ b/packages/mui-styles/test/styles.spec.tsx @@ -215,7 +215,7 @@ withStyles((theme) => }); interface ListItemContentProps extends WithStyles { - children?: React.ReactElement; + children?: React.ReactElement; inset?: boolean; row?: boolean; }