enesozturk / rn-swipeable-panel

Zero dependency swipeable bottom panel for React Native πŸ“±
MIT License
970 stars 143 forks source link

Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<SwipeablePanel> & Readonly<SwipeablePanelProps>'. #138

Open chizhkov422 opened 1 year ago

chizhkov422 commented 1 year ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch rn-swipeable-panel@1.2.7 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/rn-swipeable-panel/dist/Panel.d.ts b/node_modules/rn-swipeable-panel/dist/Panel.d.ts
index 0368e4c..19c7052 100644
--- a/node_modules/rn-swipeable-panel/dist/Panel.d.ts
+++ b/node_modules/rn-swipeable-panel/dist/Panel.d.ts
@@ -1,4 +1,4 @@
-import { Component } from 'react';
+import React, { Component } from 'react';
 import { Animated, ScrollViewProps } from 'react-native';
 declare type SwipeablePanelProps = {
     isActive: boolean;
@@ -19,6 +19,7 @@ declare type SwipeablePanelProps = {
     barContainerStyle?: object;
     allowTouchOutside?: boolean;
     scrollViewProps?: ScrollViewProps;
+    children: React.ReactElement;
 };
 declare type SwipeablePanelState = {
     status: number;

This issue body was partially generated by patch-package.

damiaofranca commented 1 year ago

I have the same problem.

yshakouri commented 1 year ago

I have same issue

chaomashi commented 1 month ago

how to fix