PluginProbe
The Innovative Form Builder – IvyForms / 0.9.1
The Innovative Form Builder – IvyForms v0.9.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / src / components / form-builder / FieldWidthIndicator.vue

FieldWidthIndicator.vue in The Innovative Form Builder – IvyForms 0.9.1, at frontend/src/components/form-builder/FieldWidthIndicator.vue

42 lines 819 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <div class="field-width-indicator">
3 {{ formattedWidth }}
4 </div>
5 </template>
6
7 <script setup lang="ts">
8 import { computed } from 'vue'
9
10 interface Props {
11 width: number
12 }
13
14 const props = defineProps<Props>()
15
16 const formattedWidth = computed(() => {
17 // Show exact numbers without decimals
18 return `${Math.round(props.width)}%`
19 })
20 </script>
21
22 <style scoped lang="scss">
23 .field-width-indicator {
24 position: absolute;
25 top: -28px;
26 left: 50%;
27 transform: translateX(-50%);
28 background: var(--map-ground-level-2-foreground);
29 color: var(--map-base-text-0);
30 padding: 4px 12px;
31 border-radius: 4px;
32 font-size: 12px;
33 font-weight: 600;
34 line-height: 16px;
35 white-space: nowrap;
36 z-index: 200;
37 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
38 pointer-events: none;
39 user-select: none;
40 }
41 </style>
42