Skip to content

Commit 6c7868a

Browse files
committed
(props) rename 'colors' to 'styles' - breaking
1 parent 23eb794 commit 6c7868a

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ You can import it as a custom component:
9595
| showReactionEmojis | Boolean | - | true |
9696
| textMessages (6) | Object | - | null |
9797
| theme (7) | Sring | - | light |
98-
| colors (8) | Object | - | (8) |
98+
| styles (8) | Object | - | (8) |
9999

100100
(1) `currentUserId` is required to display UI and trigger actions according to the user using the chat (ex: messages position on the right, etc.)
101101

@@ -178,10 +178,10 @@ textMessages="{
178178

179179
(7) `theme` can be used to change the chat theme. Currently, only `light` and `dark` are available.
180180

181-
(8) `colors` can be use to create your own theme. Ex:
181+
(8) `styles` can be use to customize your own theme. Ex:
182182

183183
```javascript
184-
colors="{
184+
styles="{
185185
general: {
186186
color: '#0a0a0a',
187187
backgroundInput: '#fff',

src/ChatWindow/ChatWindow.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import RoomsList from './RoomsList'
4747
import MessagesList from './MessagesList'
4848
const { roomsValid, partcipantsValid } = require('../utils/roomValidation')
4949
import locales from '../locales'
50-
import { defaultThemeColors, cssThemeVars } from '../themes'
50+
import { defaultThemeStyles, cssThemeVars } from '../themes'
5151
5252
export default {
5353
name: 'chat-container',
@@ -59,7 +59,7 @@ export default {
5959
props: {
6060
height: { type: String, default: '600px' },
6161
theme: { type: String, default: 'light' },
62-
colors: { type: Object, default: null },
62+
styles: { type: Object, default: null },
6363
textMessages: { type: Object, default: null },
6464
currentUserId: { type: [String, Number], default: '' },
6565
rooms: { type: Array, default: () => [] },
@@ -130,12 +130,12 @@ export default {
130130
}
131131
},
132132
cssVars() {
133-
const themeColors = {
134-
...defaultThemeColors[this.theme],
135-
...this.colors
133+
const themeStyles = {
134+
...defaultThemeStyles[this.theme],
135+
...this.styles
136136
}
137137
138-
return cssThemeVars(themeColors)
138+
return cssThemeVars(themeStyles)
139139
}
140140
},
141141

src/themes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const defaultThemeColors = {
1+
export const defaultThemeStyles = {
22
light: {
33
general: {
44
color: '#0a0a0a',

0 commit comments

Comments
 (0)