Add statusOrConversation component.
This commit is contained in:
parent
5ec4f1b047
commit
800b051a16
|
@ -0,0 +1,22 @@
|
|||
import Status from '../status/status.vue'
|
||||
import Conversation from '../conversation/conversation.vue'
|
||||
|
||||
const statusOrConversation = {
|
||||
props: ['statusoid'],
|
||||
data () {
|
||||
return {
|
||||
expanded: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Status,
|
||||
Conversation
|
||||
},
|
||||
methods: {
|
||||
toggleExpanded () {
|
||||
this.expanded = !this.expanded
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default statusOrConversation
|
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<conversation v-if="expanded" @toggleExpanded="toggleExpanded" :collapsable="true" :statusoid="statusoid"></conversation>
|
||||
<status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :statusoid="statusoid"></status>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./status_or_conversation.js"></script>
|
||||
|
||||
<style lang="scss">
|
||||
.spacer {
|
||||
height: 1em
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue