Skip to content

Commit

Permalink
fix(VBreadcrumbs): item types for slots (#19341)
Browse files Browse the repository at this point in the history
fixes #19339

Co-authored-by: Son Tran <stt@cct-technology.com>
  • Loading branch information
SonTT19 and Son Tran committed Mar 15, 2024
1 parent 1b01835 commit 756331e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/vuetify/src/components/VBreadcrumbs/VBreadcrumbs.tsx
Expand Up @@ -25,10 +25,12 @@ import type { PropType } from 'vue'
import type { LinkProps } from '@/composables/router'
import type { GenericProps } from '@/util'

export type BreadcrumbItem = string | (Partial<LinkProps> & {
export type InternalBreadcrumbItem = Partial<LinkProps> & {
title: string
disabled?: boolean
})
}

export type BreadcrumbItem = string | InternalBreadcrumbItem

export const makeVBreadcrumbsProps = propsFactory({
activeClass: String,
Expand Down Expand Up @@ -58,9 +60,9 @@ export const VBreadcrumbs = genericComponent<new <T extends BreadcrumbItem>(
},
slots: {
prepend: never
title: { item: T, index: number }
title: { item: InternalBreadcrumbItem, index: number }
divider: { item: T, index: number }
item: { item: T, index: number }
item: { item: InternalBreadcrumbItem, index: number }
default: never
}
) => GenericProps<typeof props, typeof slots>>()({
Expand Down

0 comments on commit 756331e

Please sign in to comment.