vcc-ui
Version:
VCC UI is a collection of React UI Components that can be used for developing front-end applications at Volvo Car Corporation.
14 lines (10 loc) • 316 B
JavaScript
export function getThemeStyle(component, theme, props = {}) {
if (theme.styles && theme.styles[component]) {
const componentStyle = theme.styles[component];
if (typeof componentStyle === 'function') {
return componentStyle({ theme, ...props });
}
return componentStyle;
}
return {};
}