react-multi-carousel icon indicating copy to clipboard operation
react-multi-carousel copied to clipboard

Problem with customButtonGroup

Open ankiycode opened this issue 4 years ago • 5 comments

I get the following error: Type '{}' is missing the following properties from type '{ [x: string]: any; next: any; previous: any; }': next, previous

ankiycode avatar Sep 02 '20 12:09 ankiycode

same here any solution

amantiwari1 avatar Jul 17 '21 08:07 amantiwari1

@ankiycode / @amantiwari1 - did you ever find a solution to this issue?

kuukii avatar Sep 24 '21 10:09 kuukii

Not anymore and I used swiperjs for now it is Amazing

amantiwari1 avatar Sep 24 '21 11:09 amantiwari1

@kuukii

amantiwari1 avatar Sep 24 '21 11:09 amantiwari1

@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.

mpagels avatar Jan 31 '22 16:01 mpagels