mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 09:50:33 +01:00
feat(NavigationMenu): rename links to items + improve slots
This commit is contained in:
@@ -50,7 +50,7 @@ function upperName(name: string) {
|
||||
<template>
|
||||
<UApp :toaster="appConfig.toaster">
|
||||
<div class="min-h-screen w-screen overflow-hidden flex flex-col items-center justify-center overflow-y-auto bg-white dark:bg-gray-900" vaul-drawer-wrapper>
|
||||
<UNavigationMenu :links="components.map(component => ({ label: upperName(component), to: `/${component}` }))" class="border-b border-gray-200 dark:border-gray-800 overflow-x-auto px-2" />
|
||||
<UNavigationMenu :items="components.map(component => ({ label: upperName(component), to: `/${component}` }))" class="border-b border-gray-200 dark:border-gray-800 overflow-x-auto px-2" />
|
||||
|
||||
<div class="flex-1 flex flex-col items-center justify-center w-full py-12 px-4">
|
||||
<NuxtPage />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
const links = [
|
||||
const items = [
|
||||
[{
|
||||
label: 'Profile',
|
||||
active: true,
|
||||
@@ -37,8 +37,8 @@ const links = [
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-12 w-full max-w-4xl">
|
||||
<UNavigationMenu :links="links" class="border-b border-gray-200 dark:border-gray-800" />
|
||||
<UNavigationMenu :items="items" class="border-b border-gray-200 dark:border-gray-800" />
|
||||
|
||||
<UNavigationMenu :links="links" orientation="vertical" class="w-48" />
|
||||
<UNavigationMenu :items="items" orientation="vertical" class="w-48" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user