feat(breadcrumb)!: integrate Breadcrumb with v11

This commit is contained in:
Eric Liu 2024-04-21 12:08:24 -07:00
commit 4a0534cc27
10 changed files with 94 additions and 154 deletions

View file

@ -1,27 +1,20 @@
import type { SvelteComponentTyped } from "svelte";
import type { BreadcrumbSkeletonProps } from "./BreadcrumbSkeleton.svelte";
import type { SvelteHTMLElements } from "svelte/elements";
export interface BreadcrumbProps extends BreadcrumbSkeletonProps {
type RestProps = SvelteHTMLElements["nav"];
export interface BreadcrumbProps extends RestProps {
/**
* Set to `true` to hide the breadcrumb trailing slash
* @default false
*/
noTrailingSlash?: boolean;
/**
* Set to `true` to display skeleton state
* @default false
*/
skeleton?: boolean;
[key: `data-${string}`]: any;
}
export default class Breadcrumb extends SvelteComponentTyped<
BreadcrumbProps,
{
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
},
Record<string, any>,
{ default: {} }
> {}