react-slide-deck
react-slide-deck copied to clipboard
Animation hook names as props to avoid global css
I am using CSS Modules and the animation hooks are currently static global classes. I think it will be good to have hook names be customised by passing them as props to the <Deck> and would help in avoiding global css completely.
Hi @ankitduseja , thanks for bringing it up, and that's what should've been done at the beginning. I just made a new push to the demo, take a look at it, and readme here
Passing them individually to all children <Slide> makes it cumbersome, can we probably pass it once to the <Deck> to avoid repetition. Also just to avoid possible typos/confusion between className and classNames, a better prop name would like deckClasses/deckProps or slideClasses/slideProps.
Right, classNames is really bad and confused. And on where to put this prop, I just imprudently go by the quick demo, should've been more careful.
I prefer <Deck slideClasses>,