Skip to content

Conversation

leoparis89
Copy link
Contributor

@leoparis89 leoparis89 commented Mar 25, 2022

Enables the use of BottomNavigation with no badges.
In the present state, is you put an empty string for a badge like this:

{ "key": "account", "title": "account", "icon": "credit-card", "color": "blue", "badge": "", "accessibilityLabel": "myLabel", "testID": "myId", } 

You get this unwanted behavior:

Capture d’écran 2022-03-25 à 16 38 09

Now you can just do

{ "key": "account", "title": "account", "icon": "credit-card", "color": "blue", "badge": None, "accessibilityLabel": "myLabel", "testID": "myId", } 

Capture d’écran 2022-03-25 à 16 39 46

 { "key": "account", "title": "account", "icon": "credit-card", "color": "blue", "badge": Some("33"), "accessibilityLabel": "cool", "testID": "myid", } 

Capture d’écran 2022-03-25 à 16 41 51

Also put option type on the other non mandatory route props.

@leoparis89 leoparis89 changed the title Make non mandatory BottomNavigation Enable BottomNavigation with no badges on icons Mar 25, 2022
@leoparis89 leoparis89 changed the title Enable BottomNavigation with no badges on icons Allow BottomNavigation with no badges on icons Mar 25, 2022
@leoparis89 leoparis89 marked this pull request as draft March 25, 2022 16:06
@leoparis89 leoparis89 marked this pull request as ready for review March 25, 2022 16:07
@MoOx MoOx merged commit c80588e into rescript-react-native:main May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants