chore: Add action to set dark mode from the react-native-widget (#7167)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
SET_BUBBLE_VISIBILITY,
|
||||
SET_COLOR_SCHEME,
|
||||
SET_REFERRER_HOST,
|
||||
SET_WIDGET_APP_CONFIG,
|
||||
SET_WIDGET_COLOR,
|
||||
@@ -55,6 +56,9 @@ export const actions = {
|
||||
setWidgetColor({ commit }, widgetColor) {
|
||||
commit(SET_WIDGET_COLOR, widgetColor);
|
||||
},
|
||||
setColorScheme({ commit }, darkMode) {
|
||||
commit(SET_COLOR_SCHEME, darkMode);
|
||||
},
|
||||
setReferrerHost({ commit }, referrerHost) {
|
||||
commit(SET_REFERRER_HOST, referrerHost);
|
||||
},
|
||||
@@ -83,6 +87,9 @@ export const mutations = {
|
||||
[SET_BUBBLE_VISIBILITY]($state, hideMessageBubble) {
|
||||
$state.hideMessageBubble = hideMessageBubble;
|
||||
},
|
||||
[SET_COLOR_SCHEME]($state, darkMode) {
|
||||
$state.darkMode = darkMode;
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user