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 {
5959 props: {
6060 height: { type: String , default: ' 600px' },
6161 theme: { type: String , default: ' light' },
62- styles: { type: Object , default: null },
62+ styles: { type: Object , default : () => ({}) },
6363 textMessages: { type: Object , default: null },
6464 currentUserId: { type: [String , Number ], default: ' ' },
6565 rooms: { type: Array , default : () => [] },
@@ -130,12 +130,17 @@ export default {
130130 }
131131 },
132132 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+ })
137142
138- return cssThemeVars (themeStyles )
143+ return cssThemeVars (customStyles )
139144 }
140145 },
141146
You can’t perform that action at this time.
0 commit comments