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

15 lines
291 B
JavaScript
Raw Normal View History

import Theme from 'primevue/themes';
export default (theme) => {
2024-03-31 05:41:28 +00:00
// @todo
const [{ options: o1 }, { options: o2 }] = [Theme.getTheme(), theme];
const newTheme = {
...theme,
options: { ...o1, ...o2 }
};
Theme.setTheme(newTheme);
return newTheme;
};