feat(NavigationMenu): new component

This commit is contained in:
Benjamin Canac
2024-03-19 19:12:31 +01:00
parent 5a2a31092a
commit 0d4d86d79d
9 changed files with 381 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
<script lang="ts">
import type { PrimitiveProps } from 'radix-vue'
import type { NuxtLinkProps } from '#app'
import { pick } from '#ui/utils'
export interface LinkProps extends NuxtLinkProps, Omit<PrimitiveProps, 'asChild'> {
type?: string
@@ -11,6 +12,10 @@ export interface LinkProps extends NuxtLinkProps, Omit<PrimitiveProps, 'asChild'
exactHash?: boolean
inactiveClass?: string
}
export function getNuxtLinkProps (props: NuxtLinkProps) {
return pick(props, ['to', 'href', 'target', 'rel', 'noRel', 'prefetch', 'noPrefetch'])
}
</script>
<script setup lang="ts">