mirror of
https://github.com/frappe/books.git
synced 2025-04-03 00:31:51 +00:00
24 lines
386 B
Vue
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>
|