n4kz / react-native-pages

Easy to use page view component
Other
376 stars 83 forks source link

How to custom indicator style? #20

Closed Peeratatt closed 4 years ago

Peeratatt commented 6 years ago

I wanna custom indicator style to bar style.

JackHowa commented 6 years ago

does any one have ideas for how to do this for React Navigation?

gldev commented 5 years ago

Have you tried imporing the Indicator component from the package and reimplement it? You can pass a style like that, and even wrap it in a safeview.

n4kz commented 4 years ago

Thanks for question and sorry for delayed reply. To customize indicator position and appearance you can override renderPager prop on Pages as described in readme. I've updated readme and listed all props passed to renderPager callback.

eriegz commented 4 years ago

@n4kz How about someone who wants to keep the indicator exactly as it is, but simply alter its style a bit? E.g.: something like what you could achieve by modifying src/components/indicator/styles.js, line 7:

4. container: {
5.   flex: 1,
6.   justifyContent: 'center',
7.   margin: 50,  <-------------------
8. },

Any tips for this?