diff --git a/src/runtime/components/NavigationMenu.vue b/src/runtime/components/NavigationMenu.vue index 4e5363bf..c38fc2aa 100644 --- a/src/runtime/components/NavigationMenu.vue +++ b/src/runtime/components/NavigationMenu.vue @@ -14,11 +14,8 @@ const navigationMenu = tv({ extend: tv(theme), ...(appConfig.ui?.navigationMenu export interface NavigationMenuLink extends LinkProps { label: string | number - labelClass?: any icon?: string - iconClass?: any avatar?: AvatarProps - avatarClass?: any click?: Function class?: any badge?: string | number | BadgeProps @@ -32,11 +29,12 @@ export interface NavigationMenuProps extends Omit< export interface NavigationMenuEmits extends NavigationMenuRootEmits {} +type SlotProps = (props: { link: T, active: boolean }) => any + export interface NavigationMenuSlots { - avatar(props: { link: T; active: boolean }): any - icon(props: { link: T; active: boolean }): any - badge(props: { link: T; active: boolean }): any - default(props: { link: T; active: boolean }): any + leading: SlotProps + default: SlotProps + trailing: SlotProps } @@ -83,30 +81,18 @@ function onClick (e: MouseEvent, link: NavigationMenuLink, { href, navigate, isE :class="ui.base({ active: isActive, class: link.class })" @click="onClick($event, link, { href, navigate, isExternal })" > - - + + + - - - - - - + + {{ link.label }} - - + + - + renders basic case correctly 1`] = ` "