diff --git a/src/SafeAreaContext.tsx b/src/SafeAreaContext.tsx index 5da007e..87ad055 100644 --- a/src/SafeAreaContext.tsx +++ b/src/SafeAreaContext.tsx @@ -141,11 +141,13 @@ export type WithSafeAreaInsetsProps = { }; export function withSafeAreaInsets( - WrappedComponent: React.ComponentType, + WrappedComponent: React.ComponentType< + (React.PropsWithoutRef | T) & WithSafeAreaInsetsProps + >, ): React.ForwardRefExoticComponent< React.PropsWithoutRef & React.RefAttributes > { - return React.forwardRef((props: T, ref: React.Ref) => { + return React.forwardRef((props, ref) => { const insets = useSafeAreaInsets(); return ; });