Enhancement: Add close button to the contact sidebar panel (#551)
This commit is contained in:
committed by
GitHub
parent
2d3212575d
commit
fd8e8c7c87
@@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="medium-3 bg-white contact--panel">
|
<div class="medium-3 bg-white contact--panel">
|
||||||
<div class="contact--profile">
|
<div class="contact--profile">
|
||||||
|
<span class="close-button" @click="onPanelToggle">
|
||||||
|
<i class="ion-close-round"></i>
|
||||||
|
</span>
|
||||||
<div class="contact--info">
|
<div class="contact--info">
|
||||||
<thumbnail
|
<thumbnail
|
||||||
:src="contact.thumbnail"
|
:src="contact.thumbnail"
|
||||||
@@ -101,6 +104,10 @@ export default {
|
|||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
onToggle: {
|
||||||
|
type: Function,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currentConversationMetaData() {
|
currentConversationMetaData() {
|
||||||
@@ -152,6 +159,11 @@ export default {
|
|||||||
id: this.currentConversationMetaData.contact_id,
|
id: this.currentConversationMetaData.contact_id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
onPanelToggle() {
|
||||||
|
this.onToggle();
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -165,8 +177,16 @@ export default {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background: white;
|
background: white;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.close-button {
|
||||||
|
position: absolute;
|
||||||
|
right: $space-slab;
|
||||||
|
top: $space-slab;
|
||||||
|
font-size: $font-size-default;
|
||||||
|
color: $color-heading;
|
||||||
|
}
|
||||||
.contact--profile {
|
.contact--profile {
|
||||||
padding: $space-medium $space-normal 0 $space-medium;
|
padding: $space-medium $space-normal 0 $space-medium;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<contact-panel
|
<contact-panel
|
||||||
v-if="isContactPanelOpen"
|
v-if="isContactPanelOpen"
|
||||||
:conversation-id="conversationId"
|
:conversation-id="conversationId"
|
||||||
|
:on-toggle="onToggleContactPanel"
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user