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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 5 deletions

View file

@ -32,7 +32,11 @@
<button
class="button small"
:disabled="isButtonDisabled"
:style="{ background: widgetColor, borderColor: widgetColor }"
:style="{
background: widgetColor,
borderColor: widgetColor,
color: textColor,
}"
>
<spinner v-if="isUpdating && feedback" />
<fluent-icon v-else icon="chevron-right" />
@ -47,6 +51,7 @@ import Spinner from 'shared/components/Spinner';
import { CSAT_RATINGS } from 'shared/constants/messages';
import FluentIcon from 'shared/components/FluentIcon/Index.vue';
import darkModeMixin from 'widget/mixins/darkModeMixin';
import { getContrastingTextColor } from '@chatwoot/utils';
export default {
components: {
@ -89,6 +94,9 @@ export default {
return `${this.$dm('bg-white', 'dark:bg-slate-600')}
${this.$dm('text-black-900', 'dark:text-slate-50')}`;
},
textColor() {
return getContrastingTextColor(this.widgetColor);
},
title() {
return this.isRatingSubmitted
? this.$t('CSAT.SUBMITTED_TITLE')