-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Currently this component just works with two navigation functions. Are they arrowRight and arrowLeft props
The main objective of this component is works just with render props to let the markup free for who is using.
I thought in create a new prop with the name withBulletsNavigation (or something like that) that contains a functions for make the navigation work that accept an index argument like goToIndex(index) and the current index of the navigation
I think that makes it possible the creation of a carousel with bullets for navigation
The use would be like this
<ComponentSwiper
...
withBulletsNavigation={({ goToIndex, currentIndex }) => (
bullets.map((bullet, index) => (
<li
className={ currentIndex === index ? 'active': '' }
onClick={ goToIndex(index) }>{bullet}</li>
))
)}
...
/>Reactions are currently unavailable