primevue-mirror/components/lib/themes/utils/updatePreset.js

12 lines
299 B
JavaScript
Raw Normal View History

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