Chatwoot/app/javascript/dashboard/components/widgets/InboxName.vue
2021-12-14 18:58:14 +05:30

42 lines
855 B
Vue

<template>
<woot-label
:title="inbox.name"
:icon="computedInboxClass"
color-scheme="secondary"
/>
</template>
<script>
import { getInboxClassByType } from 'dashboard/helper/inbox';
export default {
props: {
inbox: {
type: Object,
default: () => {},
},
},
computed: {
computedInboxClass() {
const { phone_number: phoneNumber, channel_type: type } = this.inbox;
const classByType = getInboxClassByType(type, phoneNumber);
return classByType;
},
},
};
</script>
<style scoped>
.inbox--name {
display: inline-flex;
padding: var(--space-micro) 0;
line-height: var(--space-slab);
font-weight: var(--font-weight-medium);
background: none;
color: var(--s-700);
font-size: var(--font-size-mini);
}
.inbox--icon {
margin-right: var(--space-micro);
color: inherit;
}
</style>