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

Optional props renaming? #47

Open
w9 opened this issue Nov 21, 2017 · 1 comment
Open

Optional props renaming? #47

w9 opened this issue Nov 21, 2017 · 1 comment

Comments

@w9
Copy link

w9 commented Nov 21, 2017

In existing projects there might be components that already has the theme prop. Also, sometimes a component only cares about parts of the theme. Maybe provide an option to send in a mapping function just like how connect in react-redux works?

withTheme(theme => {theTheme: theme})(Component)
withTheme(theme => {primaryColor: theme.palette.primary})(Component)
@w9 w9 changed the title Optionally props renaming? Optional props renaming? Nov 21, 2017
@kof
Copy link
Member

kof commented Nov 21, 2017

That seems reasonable for theming package. Not sure though how to integrate that into react-jss. I assume you are using theming directly?

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