Skip to content

Commit

Permalink
fix: property 'children' does not exist in React 18 (react-native-ele…
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitBhalla authored Oct 25, 2022
1 parent 67eb98b commit 4b859e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/themed/src/config/withTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ interface ThemeProps<T = {}> {
function withTheme<P = {}, T = {}>(
WrappedComponent: React.ComponentType<P & ThemeProps<T>>,
themeKey?: string
): React.FunctionComponent<P> | React.ForwardRefExoticComponent<P> {
):
| React.FunctionComponent<React.PropsWithChildren<P>>
| React.ForwardRefExoticComponent<
React.RefAttributes<React.PropsWithChildren<P>>
> {
const name = themeKey
? `Themed.${themeKey}`
: `Themed.${
Expand Down

0 comments on commit 4b859e5

Please sign in to comment.