Skip to content

fix: add flex: 1 to DrawerItem style#8701

Merged
satya164 merged 1 commit intoreact-navigation:mainfrom
PedroBern:main
Sep 2, 2020
Merged

fix: add flex: 1 to DrawerItem style#8701
satya164 merged 1 commit intoreact-navigation:mainfrom
PedroBern:main

Conversation

@PedroBern
Copy link
Copy Markdown
Contributor

Summary

In the DrawerItem, It's not possible to provide style for the label wrapper, only for the label, so the label wrapper must at least be flex: 1 in order to be more flexible for custom components, like in the pictures below.

In the below examples, providing flex: 1 inside the custom component view is not enough, because the wrapper does not grow. This PR will fix it.

An alternative would be creating a new prop labelStyleWrapper, but I don't see any motivation for doing so, as this PR would fix it.

Before

before

After

after

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 10, 2020

Deploy preview for react-navigation-example ready!

Built with commit 28b0376

https://deploy-preview-8701--react-navigation-example.netlify.app

Copy link
Copy Markdown
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@satya164 satya164 changed the title fix: DrawerItem style fix: add flex: 1 to DrawerItem style Sep 2, 2020
@satya164 satya164 merged commit 1c4bd68 into react-navigation:main Sep 2, 2020
@lukeellison
Copy link
Copy Markdown

Was just coming here to add this! When will this be released please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants