Closed kennetpostigo closed 8 years ago
You want 'decorators' prop.
var decorators = [{
component: React.createClass({
render() {
return (
<button
onClick={this.props.previousSlide}>
Previous Slide
</button>
)
}
}),
position: 'CenterLeft',
style: {
padding: 20
}
},
{
component: React.createClass({
render() {
return (
<button
onClick={this.props.nextSlide}>
Next Slide
</button>
)
}
}),
position: 'CenterRight',
style: {
padding: 20
}
}
];
<Carousel slidesToShow={3} slidesToScroll={3} cellAlign="left" decorators={decorators} >
//Children
</Carousel>
@charlesbodman Thank You!
@kennetpostigo You are welcome :)
Is there a prop to pass in to change the contents of the
next
andprev
buttons? Wondering because by default those are the values of the buttons for the carousel.Haven't used
nuka-carousel
before so I am not sure if I am overlooking how to change the button contents. I'm currently using a function component to render the carousel and props may be the best solution for this?