mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22:34 +00:00
Refactor on dynamic changes
This commit is contained in:
parent
31e56ea73a
commit
75b5f494d3
2 changed files with 14 additions and 4 deletions
|
@ -5,6 +5,7 @@ const ServiceSymbol = Symbol();
|
|||
export default {
|
||||
_pConfig: undefined,
|
||||
_colorScheme: 'dark',
|
||||
_initializeColorScheme: false,
|
||||
getPConfig() {
|
||||
return this._pConfig;
|
||||
},
|
||||
|
@ -21,6 +22,12 @@ export default {
|
|||
setColorScheme(newValue) {
|
||||
this._colorScheme = newValue;
|
||||
},
|
||||
isColorSchemeInit() {
|
||||
return this._initializeColorScheme;
|
||||
},
|
||||
setColorSchemeInit(newValue) {
|
||||
this._initializeColorScheme = newValue;
|
||||
},
|
||||
toggleColorScheme() {
|
||||
this._colorScheme = this._colorScheme === 'dark' ? 'light' : 'dark';
|
||||
const defaultDocument = SharedUtils.dom.isClient() ? window.document : undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue