Closed dantman closed 7 years ago
Does renderTitle
not work for you?
@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.
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.
@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?
@dantman pretty sure the styles are pretty simple. anyways, you can just import the component and reuse, why add more props?
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.
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.