Makes widget header expand and collapse by messages size (#293)
This commit is contained in:
parent
97a814cb7e
commit
274ad381cb
3 changed files with 56 additions and 2 deletions
44
app/javascript/widget/components/ChatHeader.vue
Normal file
44
app/javascript/widget/components/ChatHeader.vue
Normal file
|
@ -0,0 +1,44 @@
|
|||
<template>
|
||||
<header class="header-collapsed" :style="{ background: widgetColor }">
|
||||
<div>
|
||||
<h2 class="title">
|
||||
{{ title }}
|
||||
</h2>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'ChatHeader',
|
||||
computed: {
|
||||
...mapGetters({
|
||||
widgetColor: 'appConfig/getWidgetColor',
|
||||
}),
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '~widget/assets/scss/variables.scss';
|
||||
|
||||
.header-collapsed {
|
||||
background: $color-woot;
|
||||
padding: $space-two $space-medium;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
color: $color-white;
|
||||
|
||||
.title {
|
||||
font-size: $font-size-big;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue