mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
47 lines
1 KiB
TypeScript
47 lines
1 KiB
TypeScript
import type { SvelteComponentTyped } from "svelte";
|
|
import type { SvelteHTMLElements } from "svelte/elements";
|
|
|
|
type RestProps = SvelteHTMLElements["a"];
|
|
|
|
export interface HeaderNavMenuProps extends RestProps {
|
|
/**
|
|
* 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: {} }
|
|
> {}
|