PluginProbe
Hostinger Tools / 3.0.6
Hostinger Tools v3.0.6
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 2.0.4 All 108 releases
hostinger / vue-frontend / src / components / Label.vue

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

39 lines 852 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 import { HLabelTheme, H_LABEL_THEME_CONFIGURATION } from "@/types";
4 import { wrapInCssVar } from "@/utils/helpers";
5
6 interface Props {
7 theme?: HLabelTheme;
8 }
9
10 const props = withDefaults(defineProps<Props>(), {
11 theme: "primary",
12 });
13
14 const configuration = computed(() => H_LABEL_THEME_CONFIGURATION[props.theme]);
15
16 const style = computed(() => ({
17 backgroundColor: wrapInCssVar(configuration.value.backgroundColor),
18 color: wrapInCssVar(configuration.value.color),
19 }));
20 </script>
21
22 <template>
23 <div class="label text-overline">
24 <slot />
25 </div>
26 </template>
27
28 <style lang="scss" scoped>
29 .label {
30 display: flex;
31 padding: 4px 8px;
32 align-items: center;
33 gap: 10px;
34 border-radius: 6px;
35 background-color: v-bind("style.backgroundColor");
36 color: v-bind("style.color");
37 }
38 </style>
39