PluginProbe
The Innovative Form Builder – IvyForms / 0.6
The Innovative Form Builder – IvyForms v0.6
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 / views / admin / testing / testing-page / TestingMenus.vue

TestingMenus.vue in The Innovative Form Builder – IvyForms 0.6, at frontend/src/views/admin/testing/testing-page/TestingMenus.vue

97 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <h3>Menu Props Controls</h3>
3 <div class="menu-controls">
4 <label>
5 Priority:
6 <select v-model="priorityMenu">
7 <option value="primary">Primary</option>
8 <option value="secondary">Secondary</option>
9 <option value="tertiary">Tertiary</option>
10 </select>
11 </label>
12
13 <label>
14 Size:
15 <select v-model="sizeMenu">
16 <option value="s">Small</option>
17 <option value="d">Default</option>
18 <option value="l">Large</option>
19 </select>
20 </label>
21
22 <label>
23 Type:
24 <select v-model="typeMenu">
25 <option value="filled">Filled</option>
26 <option value="tonal">Tonal</option>
27 <option value="white">White</option>
28 </select>
29 </label>
30
31 <label>
32 Mode:
33 <select v-model="mode">
34 <option value="horizontal">Horizontal</option>
35 <option value="vertical">Vertical</option>
36 </select>
37 </label>
38 </div>
39
40 <h3>Menu Component Preview</h3>
41 <div class="menu-preview">
42 <IvyMenu :mode="mode" :ellipsis="false">
43 <IvyHeaderButton
44 v-for="item in menuItems"
45 :key="item.index"
46 :label="item.label"
47 :is-active="activeIndex === item.index"
48 :index="item.index"
49 :priority="priorityMenu"
50 :size="sizeMenu"
51 :type="typeMenu"
52 :icon-start-config="item.iconConfig as IconConfig"
53 @click="setActiveMenuItem(item.index)"
54 />
55 </IvyMenu>
56 </div>
57 </template>
58
59 <script setup lang="ts">
60 import { ref } from 'vue'
61 import type { IconCategory } from '@/types/icons/icon-category'
62 import type { IconType } from '@/types/icons/icon-type'
63
64 const priorityMenu = ref<'primary' | 'secondary' | 'tertiary'>('primary')
65 const sizeMenu = ref<'s' | 'd' | 'l'>('d')
66 const typeMenu = ref<'filled' | 'tonal' | 'white'>('filled')
67 const mode = ref<'horizontal' | 'vertical'>('horizontal')
68
69 // Active state logic
70 const activeIndex = ref('details')
71 const setActiveMenuItem = (index: string) => {
72 activeIndex.value = index
73 }
74
75 // Menu Items
76 const menuItems = ref([
77 { label: 'Details', index: 'details', iconConfig: { name: 'user' } },
78 { label: 'Services', index: 'services', iconConfig: { name: 'info', type: 'outline' } },
79 { label: 'Events', index: 'events', iconConfig: { name: 'clipboard', type: 'outline' } },
80 ])
81
82 interface IconConfig {
83 name: string
84 type?: IconType
85 category?: IconCategory
86 size?: 'l' | 'd' | 's' | 'xs'
87 outerSize?: string
88 }
89 </script>
90
91 <style lang="scss">
92 .menu-preview {
93 width: 600px;
94 align-items: center;
95 }
96 </style>
97