react-slide-deck icon indicating copy to clipboard operation
react-slide-deck copied to clipboard

Animation hook names as props to avoid global css

Open ankitduseja opened this issue 9 years ago • 3 comments

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.

ankitduseja avatar Jul 02 '16 14:07 ankitduseja

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

jl- avatar Jul 03 '16 03:07 jl-

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.

ankitduseja avatar Jul 03 '16 11:07 ankitduseja

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>,

jl- avatar Jul 03 '16 12:07 jl-