theming icon indicating copy to clipboard operation
theming copied to clipboard

Optional props renaming?

Open w9 opened this issue 8 years ago • 1 comments

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 avatar Nov 21 '17 01:11 w9

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

kof avatar Nov 21 '17 09:11 kof