PluginProbe
Hostinger Tools / trunk
Hostinger Tools vtrunk
3.0.78 3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 All 109 releases
hostinger / vue-frontend / src / components / Label.vue

Label.vue in Hostinger Tools trunk, at vue-frontend/src/components/Label.vue

40 lines 840 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <script setup lang="ts">
2 import { computed } from "vue";
3
4 import { H_LABEL_THEME_CONFIGURATION, HLabelTheme } from "@/types";
5 import { wrapInCssVar } from "@/utils/helpers";
6
7 interface Props {
8 theme?: HLabelTheme;
9 }
10
11 const props = withDefaults(defineProps<Props>(), {
12 theme: "primary"
13 });
14
15 const configuration = computed(() => H_LABEL_THEME_CONFIGURATION[props.theme]);
16
17 const style = computed(() => ({
18 backgroundColor: wrapInCssVar(configuration.value.backgroundColor),
19 color: wrapInCssVar(configuration.value.color)
20 }));
21 </script>
22
23 <template>
24 <div class="label text-overline">
25 <slot />
26 </div>
27 </template>
28
29 <style lang="scss" scoped>
30 .label {
31 display: flex;
32 padding: 4px 8px;
33 align-items: center;
34 gap: 10px;
35 border-radius: 6px;
36 background-color: v-bind("style.backgroundColor");
37 color: v-bind("style.color");
38 }
39 </style>
40