feat: add ability to override bottom tab sideContent and bottomContent styles #11927
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This is an extension to #11578
I'm using the alphas in a new project to create sidebar tabs but I am running into problems related to how the
sideContent
andbottomContent
styles are being appliedDefault padding of sidebar cannot be overriden as it's set as a constant
react-navigation/packages/bottom-tabs/src/views/BottomTabBar.tsx
Line 41 in a41d932
react-navigation/packages/bottom-tabs/src/views/BottomTabBar.tsx
Lines 457 to 461 in a41d932
react-navigation/packages/bottom-tabs/src/views/BottomTabBar.tsx
Lines 333 to 336 in a41d932
Cannot make tabs be centred through
justifyContent
. There is not way to supply additional styles that merge withsideContent
orbottomContent
.Both issues could be addressed by merging in another style option eg
Which is what this PR does
Test plan
Create sidebar tabs with these options
Tabs will be aligned at the top, add this option to center them and remove default padding
You should see this change from this
to