Open KoboBunny opened 4 years ago
Couldn't find version numbers for the following packages in the issue:
react-native-tab-view
react-native-gesture-handler
react-native-reanimated
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
+1
Man, you saved my life with the idea of adding border to the indicator
I copy-pasted the source code of TabBarIndicator.jsx into my project and played a little bit with outputRange in getTranslateX
and getWidth
methods to add some padding values that I have set in my labels. Then I used the new Indicator component in renderIndicator
prop, so it looks like this renderIndicator={(props) => <TabBarIndicator {...props} />}
.
This feature would definitely be helpful. By the way, thanks for giving the idea about the borders @KoboBunny! I've been stuck for 2 days thinking about it!
Ha i would have never thought about the hidden border tho get the indicator smaller, tried all kind of things but not that!! saved me hours! Be nice to be able out of the box to have a little more flexibility in the styling part
you can specify width: 'auto' in tabStyle
@stachu2k Any hint on how you accomplished this? I'm trying to make the indicator match the text width without removing the padding/margin from the TabItem - I've been playing around with breaking out the indicator in to a custom one and changing values but to no avail.. Any hints appreciated!
Save my life, too. Thanks😽
I love using your library and I think this feature would be a great addition!
I'm currently using the library with tabs that adjust to the size of the text within it. I also want the indicator line to the same size as the text, which I've been able to achieve by adding a borderLeftWidth, borderRightWidth and setting the border colour to equal the background colour, however I think it would be a great addition to the library to officially support it and I would be happy to create a PR for it!
Are you interested in having this functionality?