show description in room header
This commit is contained in:
@@ -1,25 +1,45 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<slot class="badge" name="body"> 0 </slot>
|
||||
</div>
|
||||
<span :class="['badge', type]" :style="{ backgroundColor: color }">
|
||||
{{ value }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: [Number, String],
|
||||
default: 0,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "#007bff",
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: "badge-primary",
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #4d5970;
|
||||
height: 1.6rem;
|
||||
width: 1.6rem;
|
||||
min-width: 1.6rem;
|
||||
min-height: 1.6rem;
|
||||
border-radius: 1.6rem;
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 0.25em 0.4em;
|
||||
font-size: 75%;
|
||||
font-weight: 700;
|
||||
/* line-height: 1; */
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.badge {
|
||||
.badge-primary {
|
||||
color: #fff;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1.4rem;
|
||||
background-color: #007bff;
|
||||
}
|
||||
|
||||
/* add more type classes for other types/colors */
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user