carbon-components-svelte/types/UIShell/HeaderNavMenu.svelte.d.ts
Eric Liu 7fdc2ef7f0
fix(types): allow data-* attributes for props forwarded to HTML elements (#1741)
* chore(deps-dev): upgrade `sveld` to v0.18.1

* Run "yarn build:docs"

* test: assert that `data-*` attributes are valid
2023-07-08 16:41:44 -07:00

46 lines
1 KiB
TypeScript

/// <reference types="svelte" />
import type { SvelteComponentTyped } from "svelte";
export interface HeaderNavMenuProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> {
/**
* Set to `true` to toggle the expanded state
* @default false
*/
expanded?: boolean;
/**
* Specify the `href` attribute
* @default "/"
*/
href?: string;
/**
* Specify the text
* @default undefined
*/
text?: string;
/**
* Obtain a reference to the HTML anchor element
* @default null
*/
ref?: null | HTMLAnchorElement;
[key: `data-${string}`]: any;
}
export default class HeaderNavMenu extends SvelteComponentTyped<
HeaderNavMenuProps,
{
keydown: WindowEventMap["keydown"];
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
keyup: WindowEventMap["keyup"];
focus: WindowEventMap["focus"];
blur: WindowEventMap["blur"];
},
{ default: {} }
> {}