Skip to content

Commit

Permalink
[chore] react and node version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
osman akar committed Jan 15, 2024
1 parent 55dc923 commit 1cac1e4
Show file tree
Hide file tree
Showing 4 changed files with 5,791 additions and 5,857 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.0.3",
"@types/jest-axe": "^3.5.3",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/storybook__react": "^5.2.1",
"@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^4.32.0",
Expand All @@ -61,18 +61,18 @@
"lerna": "^4.0.0",
"mkdirp": "^1.0.4",
"prettier": "^2.5.0",
"react-docgen-typescript-loader": "^3.7.2",
"rimraf": "^3.0.2",
"scripty": "^2.0.0",
"ts-jest": "^27.0.7",
"ts-loader": "8.3.0",
"react-docgen-typescript-loader": "^3.7.2",
"typescript": "^4.4.4",
"webpack": "5.64.4",
"webpack-cli": "^4.9.1"
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"config": {
"commitizen": {
Expand Down
28 changes: 20 additions & 8 deletions packages/dialog/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@ export const DialogOverlay = forwardRef(
}
};

const clonedChildren = cloneElement(children, {
ref: childrenRef,
...rest
});
const clonedChildren = cloneElement(
children as React.ReactElement<
any,
string | React.JSXElementConstructor<any>
>,
{
ref: childrenRef,
...rest
}
);

return (
<Portal>
Expand Down Expand Up @@ -108,10 +114,16 @@ export const DialogContentWrapper = forwardRef(
...rest
} = props;

const clonedChildren = cloneElement(children, {
ref: forwardedRef,
...rest
});
const clonedChildren = cloneElement(
children as React.ReactElement<
any,
string | React.JSXElementConstructor<any>
>,
{
ref: forwardedRef,
...rest
}
);

return (
<RemoveScroll
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/polymorphic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type ExtendableProps<
export type InheritableElementProps<
C extends React.ElementType,
Props = Record<string, unknown>
> = ExtendableProps<PropsOf<C>, Props>;
> = ExtendableProps<PropsOf<C>, Props & { children?: React.ReactNode }>;

/**
* A more sophisticated version of `InheritableElementProps` where
Expand Down
Loading

0 comments on commit 1cac1e4

Please sign in to comment.