baseui
Version:
A React Component library implementing the Base design language
23 lines (20 loc) • 628 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getFoundationColorOverrides = getFoundationColorOverrides;
/*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
const foundationColors = ['primaryA', 'primaryB', 'primary', 'accent', 'negative', 'warning', 'positive'];
function getFoundationColorOverrides(colors) {
if (!colors) return {};
return foundationColors.reduce((acc, key) => {
if (colors[key]) {
acc[key] = colors[key];
}
return acc;
}, {});
}