Chatwoot/app/javascript/widget/components/ChatHeader.vue
Pranav Raj S 45cd949c40
feat: Add a popout option on webwidget (#1174)
* feat: Add a popout option on webwidget
2020-08-28 17:39:46 +05:30

74 lines
1.3 KiB
Vue

<template>
<header class="header-collapsed">
<div class="header-branding">
<img v-if="avatarUrl" :src="avatarUrl" alt="avatar" />
<h2 class="title" v-html="title"></h2>
</div>
<header-actions :show-popout-button="showPopoutButton" />
</header>
</template>
<script>
import { mapGetters } from 'vuex';
import HeaderActions from './HeaderActions';
export default {
name: 'ChatHeader',
components: {
HeaderActions,
},
props: {
avatarUrl: {
type: String,
default: '',
},
title: {
type: String,
default: '',
},
showPopoutButton: {
type: Boolean,
default: false,
},
},
computed: {
...mapGetters({
widgetColor: 'appConfig/getWidgetColor',
}),
},
};
</script>
<style scoped lang="scss">
@import '~widget/assets/scss/variables.scss';
@import '~widget/assets/scss/mixins.scss';
.header-collapsed {
display: flex;
justify-content: space-between;
padding: $space-two $space-medium;
width: 100%;
box-sizing: border-box;
color: $color-white;
.header-branding {
display: flex;
align-items: center;
img {
border-radius: 50%;
}
}
.title {
font-size: $font-size-large;
font-weight: $font-weight-medium;
color: $color-heading;
}
img {
height: 24px;
width: 24px;
margin-right: $space-small;
}
}
</style>