Skip to content

Commit

Permalink
docs(Header): move dropdown out of link
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Nov 30, 2024
1 parent bda6098 commit f04c208
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions docs/app/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,29 @@ defineShortcuts({
<template>
<UHeader :ui="{ left: 'min-w-0' }">
<template #left>
<NuxtLink to="/" class="flex items-end gap-2 font-bold text-xl text-[var(--ui-text-highlighted)] min-w-0 focus-visible:outline-[var(--ui-primary)]" aria-label="Nuxt UI">
<NuxtLink to="/" class="flex items-end gap-2 font-bold text-xl text-[var(--ui-text-highlighted)] min-w-0 focus-visible:outline-[var(--ui-primary)] shrink-0" aria-label="Nuxt UI">
<Logo class="w-auto h-6 shrink-0" />
</NuxtLink>

<UDropdownMenu
v-slot="{ open }"
:modal="false"
:items="[{ label: `v${config.version}`, active: true, color: 'primary', checked: true, type: 'checkbox' }, { label: 'v2.19', to: 'https://ui.nuxt.com' }]"
:ui="{ content: 'w-(--radix-dropdown-menu-trigger-width) min-w-0' }"
<UDropdownMenu
v-slot="{ open }"
:modal="false"
:items="[{ label: `v${config.version}`, active: true, color: 'primary', checked: true, type: 'checkbox' }, { label: 'v2.19', to: 'https://ui.nuxt.com' }]"
:ui="{ content: 'w-(--radix-dropdown-menu-trigger-width) min-w-0' }"
size="xs"
>
<UButton
:label="`v${config.version}`"
variant="subtle"
trailing-icon="i-lucide-chevron-down"
size="xs"
>
<UButton
:label="`v${config.version}`"
variant="subtle"
trailing-icon="i-lucide-chevron-down"
size="xs"
class="-mb-[3px] font-semibold rounded-full truncate"
:class="[open && 'bg-[var(--ui-primary)]/15 ']"
:ui="{
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' ')
}"
/>
</UDropdownMenu>
</NuxtLink>
class="-mb-[6px] font-semibold rounded-full truncate"
:class="[open && 'bg-[var(--ui-primary)]/15 ']"
:ui="{
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' ')
}"
/>
</UDropdownMenu>
</template>

<UNavigationMenu :items="items" variant="link" />
Expand Down

0 comments on commit f04c208

Please sign in to comment.