carbon-components-svelte/types/UIShell/SideNavLink.svelte.d.ts
metonym ea38cd2568
feat(types): support sveltekit:prefetch, sveltekit:noscroll attributes in type definitions (#1234)
* chore(deps-dev): upgrade sveld to 0.14.0

* Run "yarn build:docs"
2022-04-09 14:13:56 -07:00

57 lines
1.3 KiB
TypeScript

/// <reference types="svelte" />
import type { SvelteComponentTyped } from "svelte";
export interface SideNavLinkProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> {
/**
* Set to `true` to select the current link
* @default false
*/
isSelected?: boolean;
/**
* Specify the `href` attribute
* @default undefined
*/
href?: string;
/**
* Specify the text
* @default undefined
*/
text?: string;
/**
* Specify the icon to render
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent;
/**
* Obtain a reference to the HTML anchor element
* @default null
*/
ref?: null | HTMLAnchorElement;
/**
* SvelteKit attribute to enable data prefetching
* if a link is hovered over or touched on mobile.
* @see https://kit.svelte.dev/docs/a-options#sveltekit-prefetch
* @default false
*/
"sveltekit:prefetch"?: boolean;
/**
* SvelteKit attribute to prevent scrolling
* after the link is clicked.
* @see https://kit.svelte.dev/docs/a-options#sveltekit-prefetch
* @default false
*/
"sveltekit:noscroll"?: boolean;
}
export default class SideNavLink extends SvelteComponentTyped<
SideNavLinkProps,
{ click: WindowEventMap["click"] },
{ default: {}; icon: {} }
> {}