2020-03-12 15:53:52 +00:00
|
|
|
<template>
|
2022-04-01 15:29:03 +00:00
|
|
|
<div
|
|
|
|
class="card-message chat-bubble agent"
|
|
|
|
:class="$dm('bg-white', 'dark:bg-slate-700')"
|
|
|
|
>
|
2020-03-12 15:53:52 +00:00
|
|
|
<img class="media" :src="mediaUrl" />
|
|
|
|
<div class="card-body">
|
2022-04-01 15:29:03 +00:00
|
|
|
<h4 class="title" :class="$dm('text-black-900', 'dark:text-slate-50')">
|
2020-03-12 15:53:52 +00:00
|
|
|
{{ title }}
|
|
|
|
</h4>
|
2022-04-01 15:29:03 +00:00
|
|
|
<p class="body" :class="$dm('text-black-700', 'dark:text-slate-100')">
|
2020-03-12 15:53:52 +00:00
|
|
|
{{ description }}
|
|
|
|
</p>
|
|
|
|
<card-button
|
|
|
|
v-for="action in actions"
|
|
|
|
:key="action.id"
|
|
|
|
:action="action"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import CardButton from 'shared/components/CardButton';
|
2022-04-01 15:29:03 +00:00
|
|
|
import darkModeMixin from 'widget/mixins/darkModeMixin.js';
|
2020-03-12 15:53:52 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
CardButton,
|
|
|
|
},
|
2022-04-01 15:29:03 +00:00
|
|
|
mixins: [darkModeMixin],
|
2020-03-12 15:53:52 +00:00
|
|
|
props: {
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
description: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
mediaUrl: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
actions: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
|
|
|
},
|
|
|
|
showAvatar: Boolean,
|
|
|
|
},
|
|
|
|
computed: {},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
@import '~widget/assets/scss/variables.scss';
|
|
|
|
@import '~dashboard/assets/scss/mixins.scss';
|
|
|
|
|
|
|
|
.card-message {
|
|
|
|
max-width: 220px;
|
|
|
|
padding: $space-small;
|
|
|
|
border-radius: $space-small;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
.title {
|
|
|
|
font-size: $font-size-default;
|
|
|
|
font-weight: $font-weight-medium;
|
|
|
|
margin-top: $space-smaller;
|
|
|
|
margin-bottom: $space-smaller;
|
|
|
|
line-height: 1.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
.body {
|
|
|
|
margin-bottom: $space-smaller;
|
|
|
|
}
|
|
|
|
|
|
|
|
.media {
|
|
|
|
@include border-light;
|
|
|
|
width: 100%;
|
|
|
|
object-fit: contain;
|
|
|
|
max-height: 150px;
|
2022-04-01 15:29:03 +00:00
|
|
|
border-radius: 5px;
|
2020-03-12 15:53:52 +00:00
|
|
|
}
|
2020-03-16 06:38:40 +00:00
|
|
|
|
|
|
|
.action-button + .action-button {
|
2022-04-01 15:29:03 +00:00
|
|
|
background: $color-white;
|
2020-03-16 06:38:40 +00:00
|
|
|
@include thin-border($color-woot);
|
|
|
|
color: $color-woot;
|
|
|
|
}
|
2020-03-12 15:53:52 +00:00
|
|
|
}
|
|
|
|
</style>
|