Skip to content

Instantly share code, notes, and snippets.

@schnerd
Last active October 15, 2019 13:57
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