cssinjs / cssinjs/theming

Optional props renaming?

Open
#47 1 comment 0 reactions 0 assignees View on GitHub
enhancement question
Dominant language
JavaScript
Stars
304
Forks
34
PR merge metrics
No merged PRs in 30d

Description

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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.