2
0
mirror of https://github.com/frappe/books.git synced 2025-04-03 00:31:51 +00:00
books/src/components/Badge.vue
18alantom abdd26f662 fix(ui): center toasts
- wider toasts
- narrower sidebar
2022-02-03 16:55:47 +05:30

24 lines
386 B
Vue

<template>
<div class="inline-block rounded-md px-2 py-1 truncate" :class="colorClass">
<slot></slot>
</div>
</template>
<script>
import { getBgTextColorClass } from '../colors';
export default {
name: 'Badge',
props: {
color: {
default: 'gray',
},
},
computed: {
colorClass() {
return getBgTextColorClass(this.color);
},
},
};
</script>