react-multi-carousel
react-multi-carousel copied to clipboard
Problem with customButtonGroup
I get the following error: Type '{}' is missing the following properties from type '{ [x: string]: any; next: any; previous: any; }': next, previous
same here any solution
@ankiycode / @amantiwari1 - did you ever find a solution to this issue?
Not anymore and I used swiperjs for now it is Amazing
@kuukii
@ankiycode @kuukii I found a solution in #178 and here
// import ButtonGroudProps as well
import Carousel, { ButtonGroupProps } from 'react-multi-carousel'
// ... all your other code
// use ButtonGroupProps on your custom button group
function Buttons({ next, previous }: ButtonGroupProps) {
return (
<ButtonWrapper>
<button onClick={() => previous()}>
<button onClick={() => next()}>
</ButtonWrapper>
)
}
This solved the Type '{}' is missing the following properties from type '{ [x: string]: any; next: any; previous: any; }': next, previous
error for me.