Enhancement: Add close button to the contact sidebar panel (#551)

This commit is contained in:
Nithin David Thomas
2020-02-23 21:13:28 +05:30
committed by GitHub
parent 2d3212575d
commit fd8e8c7c87
2 changed files with 21 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
<template>
<div class="medium-3 bg-white contact--panel">
<div class="contact--profile">
<span class="close-button" @click="onPanelToggle">
<i class="ion-close-round"></i>
</span>
<div class="contact--info">
<thumbnail
:src="contact.thumbnail"
@@ -101,6 +104,10 @@ export default {
type: [Number, String],
required: true,
},
onToggle: {
type: Function,
default: () => {},
},
},
computed: {
currentConversationMetaData() {
@@ -152,6 +159,11 @@ export default {
id: this.currentConversationMetaData.contact_id,
});
},
methods: {
onPanelToggle() {
this.onToggle();
},
},
};
</script>
@@ -165,8 +177,16 @@ export default {
overflow-y: auto;
background: white;
overflow: auto;
position: relative;
}
.close-button {
position: absolute;
right: $space-slab;
top: $space-slab;
font-size: $font-size-default;
color: $color-heading;
}
.contact--profile {
padding: $space-medium $space-normal 0 $space-medium;
align-items: center;

View File

@@ -14,6 +14,7 @@
<contact-panel
v-if="isContactPanelOpen"
:conversation-id="conversationId"
:on-toggle="onToggleContactPanel"
/>
</section>
</template>