carbon-components-svelte/types/UIShell/HeaderNavItem.svelte.d.ts
Eric Liu 2f026f792a
feat(typescript)!: support svelte 4 (#1773)
Closes #1753 

The minimum Svelte version required for TypeScript users is now 3.55.
2023-07-19 09:44:56 -07:00

47 lines
1 KiB
TypeScript

import type { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["a"];
export interface HeaderNavItemProps extends RestProps {
/**
* Specify the `href` attribute
* @default undefined
*/
href?: string;
/**
* Specify the text
* @default undefined
*/
text?: string;
/**
* Set to `true` to select the item
* @default false
*/
isSelected?: boolean;
/**
* Obtain a reference to the HTML anchor element
* @default null
*/
ref?: null | HTMLAnchorElement;
[key: `data-${string}`]: any;
}
export default class HeaderNavItem extends SvelteComponentTyped<
HeaderNavItemProps,
{
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
keyup: WindowEventMap["keyup"];
keydown: WindowEventMap["keydown"];
focus: WindowEventMap["focus"];
blur: WindowEventMap["blur"];
},
{ default: {} }
> {}