mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 10:50:40 +01:00
docs(Header): move dropdown out of link
This commit is contained in:
@@ -22,29 +22,29 @@ defineShortcuts({
|
|||||||
<template>
|
<template>
|
||||||
<UHeader :ui="{ left: 'min-w-0' }">
|
<UHeader :ui="{ left: 'min-w-0' }">
|
||||||
<template #left>
|
<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" />
|
<Logo class="w-auto h-6 shrink-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"
|
|
||||||
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>
|
</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' }"
|
||||||
|
size="xs"
|
||||||
|
>
|
||||||
|
<UButton
|
||||||
|
:label="`v${config.version}`"
|
||||||
|
variant="subtle"
|
||||||
|
trailing-icon="i-lucide-chevron-down"
|
||||||
|
size="xs"
|
||||||
|
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>
|
</template>
|
||||||
|
|
||||||
<UNavigationMenu :items="items" variant="link" />
|
<UNavigationMenu :items="items" variant="link" />
|
||||||
|
|||||||
Reference in New Issue
Block a user