Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Dynamically generated carousel screens throws a typing error #768

Open
Sai-Raveendra-Kandregula opened this issue Nov 7, 2024 · 0 comments

Comments

@Sai-Raveendra-Kandregula

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Issue : Using Dynamically generated carousel screens throws a typing error.

Here is the diff that solved my problem:

diff --git a/node_modules/react-responsive-carousel/lib/ts/components/Carousel/types.d.ts b/node_modules/react-responsive-carousel/lib/ts/components/Carousel/types.d.ts
index f170eef..33c5797 100644
--- a/node_modules/react-responsive-carousel/lib/ts/components/Carousel/types.d.ts
+++ b/node_modules/react-responsive-carousel/lib/ts/components/Carousel/types.d.ts
@@ -18,7 +18,7 @@ export interface CarouselProps {
     autoPlay?: boolean;
     centerMode?: boolean;
     centerSlidePercentage: number;
-    children?: React.ReactChild[];
+    children?: React.ReactNode;
     className?: string;
     dynamicHeight?: boolean;
     emulateTouch?: boolean;

If needed, I can raise a PR too. Thank you for your work once again!

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant