@webitel/ui-sdk 23.12.77 → 23.12.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -5,12 +5,19 @@ import { useStore } from 'vuex';
|
|
|
5
5
|
import WtIcon from '../../../components/wt-icon/wt-icon.vue';
|
|
6
6
|
import WtSwitcher from '../../../components/wt-switcher/wt-switcher.vue';
|
|
7
7
|
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
namespace: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'appearance',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
8
15
|
const store = useStore();
|
|
9
16
|
|
|
10
17
|
const mode = ref(localStorage.getItem('colorScheme') || 'light');
|
|
11
18
|
|
|
12
19
|
const setThemeToStore = (theme) => {
|
|
13
|
-
store.dispatch(
|
|
20
|
+
store.dispatch(`${props.namespace}/SET_THEME`, theme);
|
|
14
21
|
};
|
|
15
22
|
|
|
16
23
|
const toggleDarkMode = () => {
|