docs/.vitepress/theme/components/Highlight.vue
46 lines · 697 bytes
1<template>
2 <span class="highlight-pill" :class="variant">
3 <slot />
4 </span>
5</template>
6
7<script setup>
8defineProps({
9 variant: {
10 type: String,
11 default: 'default'
12 }
13})
14</script>
15
16<style scoped>
17.highlight-pill {
18 display: inline-block;
19 padding: 0 0.25em;
20 border-radius: 4px;
21 font-size: 0.9em;
22 font-weight: 500;
23 line-height: 1.5;
24 white-space: nowrap;
25 vertical-align: baseline;
26 border: 1px solid;
27}
28
29.default {
30 background-color: #042a20;
31 color: #a8f0cc;
32 border-color: #0a5c42;
33}
34
35.warning {
36 background-color: #413306;
37 color: #fee38b;
38 border-color: #86680e;
39}
40
41.danger {
42 background-color: #430a0a;
43 color: #fec8c8;
44 border-color: #981b1b;
45}
46</style>