Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

titleView prop in Navigator.Config? #99

Open
nfcampos opened this issue Apr 30, 2017 · 1 comment
Open

titleView prop in Navigator.Config? #99

nfcampos opened this issue Apr 30, 2017 · 1 comment

Comments

@nfcampos
Copy link
Contributor

nfcampos commented Apr 30, 2017

Would it make sense to add a titleView prop to Navigator.Config to be able to use a custom view in place of the title?
Something like:

<Navigator.Config
  titleView="SomeView"
/>

where SomeView is

...
AppRegistry.registerComponent('SomeView', () => SomeView)

and possibly a titleViewProps prop for props to pass to the view.

It's not the ideal API, I think, I'd want this instead

<Navigator.Config
  titleView={<SomeView prop="value" />}
/>

but I'm not sure how feasible that is

Super useful either way IMO, what do you guys think?

(EDIT: this might make sense only for iOS, not sure about that)

@benkraus
Copy link
Contributor

benkraus commented May 2, 2017

I have a pull request that adds support for a title view image, which is a fairly common use case there. I have it on my to do list to add support for a full on title view that is a component.

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

No branches or pull requests

2 participants