mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Theming API: Added theme:load
and theme:[data-primevue-style-id]:load
emits to ThemeService
This commit is contained in:
parent
7055387be4
commit
9303e9c3ab
3 changed files with 36 additions and 4 deletions
|
@ -40,7 +40,9 @@ export default {
|
|||
return css ? useStyle(ObjectUtils.minifyCSS(css), { name: this.name, ...options }) : {};
|
||||
},
|
||||
loadTheme(theme, options = {}) {
|
||||
return theme ? useStyle(ObjectUtils.minifyCSS(theme), { name: this.name, ...options }) : {};
|
||||
const callbacks = { onMounted: (name) => Theme.onStyleMounted(name), onUpdated: (name) => Theme.onStyleUpdated(name), onLoad: (event, options) => Theme.onStyleLoaded(event, options) };
|
||||
|
||||
return theme ? useStyle(ObjectUtils.minifyCSS(theme), { name: this.name, ...options, ...callbacks }) : {};
|
||||
},
|
||||
getCommonThemeCSS(params) {
|
||||
return Theme.getCommonCSS(this.name, params);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue