Open LeoTianJob opened 7 years ago
Thanks a lot, but with this method, the dots position also be changed in the other components that use this library. Am I right?
Yeah anytime that you use Swiper the dots will be on the left. You could instead change justifyContent to "justifyContent: {this.props.DotLocation}" and then go into the Index.js file and where \<Dots... is, add DotLocation={this.props.DotLocation} and then whenever you create a new Swiper, you'll have to add the property "DotLocation" and use some justifyContent value. For example... \<Swiper DotLocation='flex-start'> or \<Swiper DotLocation="flex-end"> etc. Keep in mind that if you do decide to do that, you would need to add a constructor in the Dots.js file, with props in the parameter
This is quite helpful, thanks for answering.
Yep!
In your project files, go to YourProject/node_modules/react-native-page-swiper/src/... Open the "Dots.js" file and scroll to the bottom. In styles, change "justifyContent: 'center'" to "justifyContent: 'flex-start'"