mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 09:50:33 +01:00
feat(NavigationMenu): new component
This commit is contained in:
43
playground/pages/navigation-menu.vue
Normal file
43
playground/pages/navigation-menu.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<script setup lang="ts">
|
||||
const links = [
|
||||
[{
|
||||
label: 'Profile',
|
||||
avatar: {
|
||||
src: 'https://avatars.githubusercontent.com/u/739984?v=4'
|
||||
},
|
||||
badge: 100,
|
||||
coucou: 'test',
|
||||
click () {
|
||||
console.log('Profile clicked')
|
||||
}
|
||||
}, {
|
||||
label: 'Modal',
|
||||
icon: 'i-heroicons-home',
|
||||
to: '/modal'
|
||||
}, {
|
||||
label: 'NavigationMenu',
|
||||
icon: 'i-heroicons-chart-bar',
|
||||
to: '/navigation-menu'
|
||||
}, {
|
||||
label: 'Popover',
|
||||
icon: 'i-heroicons-command-line',
|
||||
to: '/popover'
|
||||
}], [{
|
||||
label: 'Examples',
|
||||
icon: 'i-heroicons-light-bulb',
|
||||
to: 'https://ui.nuxt.com',
|
||||
target: '_blank'
|
||||
}, {
|
||||
label: 'Help',
|
||||
icon: 'i-heroicons-question-mark-circle'
|
||||
}]
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-12 w-4xl">
|
||||
<UNavigationMenu :links="links" class="border-b border-gray-200 dark:border-gray-800" />
|
||||
|
||||
<UNavigationMenu :links="links" orientation="vertical" class="w-48" />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user