Feature: Rich Message Types (#610)

Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
This commit is contained in:
Sojan Jose
2020-04-10 16:42:37 +05:30
committed by GitHub
parent 48f603798b
commit b0950d6880
58 changed files with 997 additions and 146 deletions

View File

@@ -4,12 +4,17 @@
<h4 class="title">
{{ title }}
</h4>
<ul class="options" :class="{ 'has-selected': !!selected }">
<ul
v-if="!hideFields"
class="options"
:class="{ 'has-selected': !!selected }"
>
<chat-option
v-for="option in options"
:key="option.id"
:action="option"
:is-selected="isSelected(option)"
@click="onClick"
/>
</ul>
</div>
@@ -36,11 +41,18 @@ export default {
type: String,
default: '',
},
hideFields: {
type: Boolean,
default: false,
},
},
methods: {
isSelected(option) {
return this.selected === option.id;
},
onClick(selectedOption) {
this.$emit('click', selectedOption);
},
},
};
</script>
@@ -59,7 +71,6 @@ export default {
@import '~dashboard/assets/scss/mixins.scss';
.options-message {
@include border-normal;
background: white;
width: 60%;
max-width: 17rem;