mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
/// <reference types="svelte" />
|
|
import type { SvelteComponentTyped } from "svelte";
|
|
|
|
export interface SkipToContentProps
|
|
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> {
|
|
/**
|
|
* Specify the `href` attribute
|
|
* @default "#main-content"
|
|
*/
|
|
href?: string;
|
|
|
|
/**
|
|
* Specify the tabindex
|
|
* @default "0"
|
|
*/
|
|
tabindex?: string;
|
|
|
|
/**
|
|
* 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 trigger a full page
|
|
* reload after the link is clicked.
|
|
* @see https://kit.svelte.dev/docs/a-options#sveltekit-reload
|
|
* @default false
|
|
*/
|
|
"sveltekit:reload"?: boolean;
|
|
|
|
/**
|
|
* SvelteKit attribute to prevent scrolling
|
|
* after the link is clicked.
|
|
* @see https://kit.svelte.dev/docs/a-options#sveltekit-noscroll
|
|
* @default false
|
|
*/
|
|
"sveltekit:noscroll"?: boolean;
|
|
}
|
|
|
|
export default class SkipToContent extends SvelteComponentTyped<
|
|
SkipToContentProps,
|
|
{ click: WindowEventMap["click"] },
|
|
{ default: {} }
|
|
> {}
|