AaronCCWong / react-card-flip

React component for card flipping animation.
https://aaronccwong.github.io/react-card-flip
MIT License
337 stars 64 forks source link

Allow to specify the initial face via `props.isFlippable` if `props.infinite` is `true` #92

Closed hadielyakhni closed 1 year ago

hadielyakhni commented 2 years ago

Hello @AaronCCWong, thank you for this library, very useful!!

For a project I am working on, I needed to choose between showing the front or back of the card on mount, so I did:

<CardFlip infinite={true} isFlippable{condition} ... > ... </CardFlip>

But because I am setting infinite to true, condition didn't have an effect, and always, the front card was showing.