Chatwoot/app/javascript/widget/components/ChatHeader.vue

75 lines
1.3 KiB
Vue
Raw Normal View History

<template>
2020-01-17 08:06:05 +00:00
<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';
2020-01-17 08:06:05 +00:00
@import '~widget/assets/scss/mixins.scss';
.header-collapsed {
2020-01-17 08:06:05 +00:00
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 {
2020-01-17 08:06:05 +00:00
font-size: $font-size-large;
font-weight: $font-weight-medium;
2020-01-17 08:06:05 +00:00
color: $color-heading;
}
img {
height: 24px;
width: 24px;
margin-right: $space-small;
}
}
</style>