2019-10-29 07:20:54 +00:00
|
|
|
<template>
|
2020-01-13 06:40:40 +00:00
|
|
|
<header class="header-expanded">
|
2020-03-07 18:09:41 +00:00
|
|
|
<!-- <img
|
2020-01-13 06:40:40 +00:00
|
|
|
class="logo"
|
2020-03-07 18:09:41 +00:00
|
|
|
src=""
|
2020-01-13 06:40:40 +00:00
|
|
|
/> -->
|
2020-03-07 18:09:41 +00:00
|
|
|
<span class="close close-button" @click="closeWindow"></span>
|
|
|
|
<h2 class="title">
|
|
|
|
{{ introHeading }}
|
|
|
|
</h2>
|
|
|
|
<p class="body">
|
|
|
|
{{ introBody }}
|
|
|
|
</p>
|
2019-10-29 07:20:54 +00:00
|
|
|
</header>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-11-25 18:40:27 +00:00
|
|
|
import { mapGetters } from 'vuex';
|
2020-03-07 18:09:41 +00:00
|
|
|
import { IFrameHelper } from 'widget/helpers/utils';
|
2019-11-25 18:40:27 +00:00
|
|
|
|
2019-10-29 07:20:54 +00:00
|
|
|
export default {
|
|
|
|
name: 'ChatHeaderExpanded',
|
2019-11-25 18:40:27 +00:00
|
|
|
computed: {
|
|
|
|
...mapGetters({
|
|
|
|
widgetColor: 'appConfig/getWidgetColor',
|
|
|
|
}),
|
|
|
|
},
|
2019-10-29 07:20:54 +00:00
|
|
|
props: {
|
|
|
|
introHeading: {
|
|
|
|
type: String,
|
|
|
|
default: 'Hi there ! 🙌🏼',
|
|
|
|
},
|
|
|
|
introBody: {
|
|
|
|
type: String,
|
|
|
|
default:
|
|
|
|
'We make it simple to connect with us. Ask us anything, or share your feedback.',
|
|
|
|
},
|
|
|
|
},
|
2020-03-07 18:09:41 +00:00
|
|
|
methods: {
|
|
|
|
closeWindow() {
|
|
|
|
if (IFrameHelper.isIFrame()) {
|
|
|
|
IFrameHelper.sendMessage({
|
|
|
|
event: 'toggleBubble',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2019-10-29 07:20:54 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
@import '~widget/assets/scss/variables.scss';
|
2020-01-17 08:06:05 +00:00
|
|
|
@import '~widget/assets/scss/mixins.scss';
|
2019-10-29 07:20:54 +00:00
|
|
|
|
|
|
|
.header-expanded {
|
2020-01-13 06:40:40 +00:00
|
|
|
padding: $space-larger $space-medium $space-large;
|
2019-10-29 07:20:54 +00:00
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
2020-03-07 18:09:41 +00:00
|
|
|
position: relative;
|
2020-01-13 06:40:40 +00:00
|
|
|
|
|
|
|
.logo {
|
|
|
|
width: 64px;
|
|
|
|
height: 64px;
|
|
|
|
}
|
2019-10-29 07:20:54 +00:00
|
|
|
|
2020-03-07 18:09:41 +00:00
|
|
|
.close {
|
|
|
|
position: absolute;
|
|
|
|
right: $space-medium;
|
|
|
|
top: $space-medium;
|
|
|
|
display: none;
|
|
|
|
}
|
2019-10-29 07:20:54 +00:00
|
|
|
.title {
|
2020-01-13 06:40:40 +00:00
|
|
|
color: $color-heading;
|
2019-10-29 07:20:54 +00:00
|
|
|
font-size: $font-size-mega;
|
2020-01-13 06:40:40 +00:00
|
|
|
font-weight: $font-weight-normal;
|
|
|
|
margin-bottom: $space-slab;
|
|
|
|
margin-top: $space-large;
|
2019-10-29 07:20:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.body {
|
2020-01-13 06:40:40 +00:00
|
|
|
color: $color-body;
|
|
|
|
font-size: 1.8rem;
|
2020-02-05 05:57:22 +00:00
|
|
|
line-height: 1.5;
|
2019-10-29 07:20:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|