Chatwoot/app/javascript/survey/components/Feedback.vue

55 lines
1.1 KiB
Vue
Raw Normal View History

2021-08-23 16:30:47 +00:00
<template>
<div>
<label class="text-base font-medium text-black-800">
{{ $t('SURVEY.FEEDBACK.LABEL') }}
</label>
<text-area
v-model="feedback"
class="my-5"
:placeholder="$t('SURVEY.FEEDBACK.PLACEHOLDER')"
/>
<div class="flex items-center font-medium float-right">
<custom-button @click="onClick">
<spinner v-if="feedback" class="p-0" />
{{ $t('SURVEY.FEEDBACK.BUTTON_TEXT') }}
</custom-button>
</div>
</div>
</template>
<script>
import CustomButton from 'shared/components/Button';
import TextArea from 'shared/components/TextArea.vue';
import Spinner from 'shared/components/Spinner';
export default {
name: 'Feedback',
components: {
CustomButton,
TextArea,
Spinner,
},
props: {
isUpdating: {
type: Boolean,
default: null,
},
isButtonDisabled: {
type: Boolean,
default: null,
},
},
data() {
return {
feedback: '',
};
},
methods: {
onClick() {
this.$emit('sendFeedback', this.feedback);
},
},
};
</script>