File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export default {
59
59
props: {
60
60
height: { type: String , default: ' 600px' },
61
61
theme: { type: String , default: ' light' },
62
- styles: { type: Object , default: null },
62
+ styles: { type: Object , default : () => ({}) },
63
63
textMessages: { type: Object , default: null },
64
64
currentUserId: { type: [String , Number ], default: ' ' },
65
65
rooms: { type: Array , default : () => [] },
@@ -130,12 +130,17 @@ export default {
130
130
}
131
131
},
132
132
cssVars () {
133
- const themeStyles = {
134
- ... defaultThemeStyles[this .theme ],
135
- ... this .styles
136
- }
133
+ const defaultStyles = defaultThemeStyles[this .theme ]
134
+ const customStyles = {}
135
+
136
+ Object .keys (defaultStyles).map (key => {
137
+ customStyles[key] = {
138
+ ... defaultStyles[key],
139
+ ... (this .styles [key] || {})
140
+ }
141
+ })
137
142
138
- return cssThemeVars (themeStyles )
143
+ return cssThemeVars (customStyles )
139
144
}
140
145
},
141
146
You can’t perform that action at this time.
0 commit comments