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

14 lines
278 B
JavaScript
Raw Normal View History

import Theme from 'primevue/themes';
export default (theme) => {
const [{ options: o1 }, { options: o2 }] = [Theme.getTheme(), theme];
const newTheme = {
...theme,
options: { ...o1, ...o2 }
};
Theme.setTheme(newTheme);
return newTheme;
};