Skip to content

Commit 7307c19

Browse files
aarongarciahDiegoAndai
authored andcommitted
[system] Make createGrid compatible with React 19 types (mui#44035)
1 parent 1445c07 commit 7307c19

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/mui-system/src/Unstable_Grid/createGrid.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ export default function createGrid(
164164
{...other}
165165
>
166166
{React.Children.map(children, (child) => {
167-
if (React.isValidElement(child) && isMuiElement(child, ['Grid'])) {
167+
if (
168+
React.isValidElement<{ container?: unknown }>(child) &&
169+
isMuiElement(child, ['Grid'])
170+
) {
168171
return React.cloneElement(child, {
169172
unstable_level: (child.props as GridProps)?.unstable_level ?? level + 1,
170173
} as GridProps);

0 commit comments

Comments
 (0)