primevue-mirror/components/lib/themes/actions/definePreset.js

11 lines
303 B
JavaScript
Raw Normal View History

import Theme, { SharedUtils } from 'primevue/themes';
export default (preset1, preset2) => {
const VARIABLE = Theme.defaults.variable;
const newPreset = SharedUtils.object.mergeKeysByRegex(preset1, preset2, VARIABLE.excludedKeyRegex);
Theme.setPreset(newPreset);
return newPreset;
};