Skip to content
This repository was archived by the owner on Feb 15, 2019. It is now read-only.

Add before and after props NavigationBar.Title.#419

Closed
dantman wants to merge 1 commit intoexpo:masterfrom
dantman:title-widget
Closed

Add before and after props NavigationBar.Title.#419
dantman wants to merge 1 commit intoexpo:masterfrom
dantman:title-widget

Conversation

@dantman
Copy link

@dantman dantman commented Feb 22, 2017

This helps insert non-text components before and after title text in the title area.

Adding things like icons to the title is impossible when all of NavigationBar.Title’s children are text.

This helps insert non-text components before and after title text in the title area.

Adding things like icons to the title is impossible when all of NavigationBar.Title’s children are text.
@chirag04
Copy link
Contributor

Does renderTitle not work for you?

@dantman
Copy link
Author

dantman commented Feb 22, 2017

@chirag04 Then you have to manually reimplement all the text styles from scratch to get them back, just so you can stick an icon on the end.

@chirag04
Copy link
Contributor

The default implementation of header text doesn't do much. it's not a bad idea of override it especially when you have custom need for icons etc. before and after seems very to fix your very specific case and will only increase the api surface area and maintenance.

@dantman
Copy link
Author

dantman commented Feb 23, 2017

@chirag04 titleStyles.title(Text) contains a bunch of platform specific styles and are based on platform recommendations instead of app styling. Recreating that in app styles just to add something like an app menu or add a title icon is a bad idea.

How do you feel about decoupling the text portion as a separate component from the title container it is in so the app can override / extend them individually?

@satya164
Copy link
Contributor

@dantman pretty sure the styles are pretty simple. anyways, you can just import the component and reuse, why add more props?

@dantman
Copy link
Author

dantman commented Feb 24, 2017

Superseded by #421.

Ok @chirag04, instead of adding some single-purpose properties to the title bar component I just split the container and text portions of the title bar up. This will work with absolutely any customizations one might want to do to the title bar.

@dantman dantman closed this Feb 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants