react-elastic-carousel
react-elastic-carousel copied to clipboard
Typescript Support
Do we have typescript supported version on it way? I have been trying to implement with Typescript, I end up getting so many errors I am not sure how to fix.
error TS2769: No overload matches this call. Overload 1 of 2, '(props: ReactElasticCarouselProps | Readonly): ReactElasticCarousel', gave the following error. Type '{ children: Element[]; itemsToShow: number; itemsToScroll: number; isRTL: boolean; showArrows: false; outerSpacing: number; itemPadding: number[]; pagination: true; breakPoints: ({ width: number; itemsToShow: number; itemsToScroll?: undefined; } | { ...; })[]; focusOnSelect: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'. Overload 2 of 2, '(props: ReactElasticCarouselProps, context: any): ReactElasticCarousel', gave the following error. Type '{ children: Element[]; itemsToShow: number; itemsToScroll: number; isRTL: boolean; showArrows: false; outerSpacing: number; itemPadding: number[]; pagination: true; breakPoints: ({ width: number; itemsToShow: number; itemsToScroll?: undefined; } | { ...; })[]; focusOnSelect: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.
same problem here
I've forked a version of this and added TS/React 18 support: https://www.npmjs.com/package/@itseasy21/react-elastic-carousel Hopefully, this helps :-)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.