Files
crawler-plugin/admin-frontend-vue/src/components/StatusPill.vue
T

26 lines
650 B
Vue

<script setup lang="ts">
import { computed } from 'vue'
import { pillToneStyle, type PillTone } from './status-pill-model'
const props = withDefaults(defineProps<{ text: string; tone?: PillTone }>(), { tone: 'info' })
const style = computed(() => pillToneStyle(props.tone))
</script>
<template>
<span class="status-pill" :style="{ color: style.text, background: style.bg }">{{ text }}</span>
</template>
<style scoped>
.status-pill {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 62px;
padding: 2px 10px;
border-radius: 999px;
font-size: 12px;
line-height: 1.7;
white-space: nowrap;
}
</style>