Skip to content

Is it possible to change the titleStyle when switching Route? #100

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

Closed
BigPun86 opened this issue Mar 15, 2016 · 2 comments
Closed

Is it possible to change the titleStyle when switching Route? #100

BigPun86 opened this issue Mar 15, 2016 · 2 comments
Assignees
Milestone

Comments

@BigPun86
Copy link
Contributor

Hey there! I would like to change the titleStyle in one of my nested routes. It works for the headerStyle where i just pass the new backgroundColor to it. But nothing changes when i try the same for titleStyle.

this.props.replaceRoute({
    name: 'HOME',
    component: Routes.Dashboard,
    titleStyle: {color: 'red'},
    headerStyle: {backgroundColor: 'green'}
});
@charpeni
Copy link
Contributor

Hi @BigPun86.

At this time, titleStyle is not available outside <Router> props.

Until a pull request is submitted you can use titleComponent with style inside titleProps.

Thank you for this use case.

@BigPun86
Copy link
Contributor Author

@charpeni thanks

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

No branches or pull requests

2 participants