fix: Text colour is getting merged with the light background colour (#5773)

This commit is contained in:
Sivin Varghese
2022-11-02 05:52:00 +05:30
committed by GitHub
parent f2753df8df
commit e1190fd9bf
5 changed files with 43 additions and 5 deletions

View File

@@ -2,12 +2,13 @@
<div
v-dompurify-html="formatMessage(message, false)"
class="chat-bubble user"
:style="{ background: widgetColor }"
:style="{ background: widgetColor, color: textColor }"
/>
</template>
<script>
import messageFormatterMixin from 'shared/mixins/messageFormatterMixin';
import { getContrastingTextColor } from '@chatwoot/utils';
export default {
name: 'UserMessageBubble',
@@ -26,6 +27,11 @@ export default {
default: '',
},
},
computed: {
textColor() {
return getContrastingTextColor(this.widgetColor);
},
},
};
</script>