Last active
October 15, 2019 13:57
-
-
Save schnerd/c6753b941954f96ec16fea2ce47e74d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getComponents(defaultComponents, overrides) { | |
return Object.keys(defaultComponents).reduce((acc, name) => { | |
const override = overrides[name] || {}; | |
acc[name] = { | |
component: override.component || defaultComponents[name], | |
props: {$style: override.style, ...override.props}, | |
}; | |
return acc; | |
}, {}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment