Skip to content

Commit b758730

Browse files
author
Victor Saiz
committed
more concise version
1 parent 8722c2a commit b758730

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/themr.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ export default (componentName, localTheme, options = {}) => (ThemedComponent) =>
8585
function themeable(style = {}, theme) {
8686
if (!theme) return style
8787
return Object.keys(theme).reduce((result, key) => (
88-
Object.assign(result,
89-
style[key] && theme[key].indexOf(style[key]) === -1
90-
? { [key]: `${style[key]} ${theme[key]}` }
91-
: { [key]: theme[key] || style[key] }
92-
)), style)
88+
Object.assign(result, { [key]:
89+
style[key] && theme[key].indexOf(style[key]) === -1
90+
? `${style[key]} ${theme[key]}`
91+
: theme[key] || style[key]
92+
})), style)
9393
}
9494

9595
function validateComposeOption(composeTheme) {

0 commit comments

Comments
 (0)