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

@ -71,7 +71,11 @@
v-if="!submittedValues.length"
class="button block"
type="submit"
:style="{ background: widgetColor, borderColor: widgetColor }"
:style="{
background: widgetColor,
borderColor: widgetColor,
color: textColor,
}"
@click="onSubmitClick"
>
{{ buttonLabel || $t('COMPONENTS.FORM_BUBBLE.SUBMIT') }}
@ -83,6 +87,7 @@
<script>
import { mapGetters } from 'vuex';
import darkModeMixin from 'widget/mixins/darkModeMixin.js';
import { getContrastingTextColor } from '@chatwoot/utils';
export default {
mixins: [darkModeMixin],
@ -110,6 +115,9 @@ export default {
...mapGetters({
widgetColor: 'appConfig/getWidgetColor',
}),
textColor() {
return getContrastingTextColor(this.widgetColor);
},
inputColor() {
return `${this.$dm('bg-white', 'dark:bg-slate-600')}
${this.$dm('text-black-900', 'dark:text-slate-50')}`;