diff --git a/src/components/themr.js b/src/components/themr.js index 1ea0ca7..aaa4d8c 100644 --- a/src/components/themr.js +++ b/src/components/themr.js @@ -84,11 +84,12 @@ export default (componentName, localTheme, options = {}) => (ThemedComponent) => function themeable(style = {}, theme) { if (!theme) return style - return [ ...Object.keys(theme), ...Object.keys(style) ].reduce((result, key) => ( - typeof theme[key] === 'string' && style[key] && theme[key].indexOf(style[key]) === -1 - ? { ...result, [key]: `${style[key]} ${theme[key]}` } - : { ...result, [key]: theme[key] || style[key] } - ), {}) + return Object.keys(theme).reduce((result, key) => ( + Object.assign(result, { [key]: + style[key] && theme[key].indexOf(style[key]) === -1 + ? `${style[key]} ${theme[key]}` + : theme[key] || style[key] + })), style) } function validateComposeOption(composeTheme) {