Last active
October 15, 2019 13:57
This file contains hidden or 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