mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
38 lines
831 B
TypeScript
38 lines
831 B
TypeScript
import type { SvelteComponentTyped } from "svelte";
|
|
import type { SvelteHTMLElements } from "svelte/elements";
|
|
|
|
type RestProps = SvelteHTMLElements["a"];
|
|
|
|
export interface HeaderActionLinkProps extends RestProps {
|
|
/**
|
|
* Set to `true` to use the active state
|
|
* @default false
|
|
*/
|
|
linkIsActive?: boolean;
|
|
|
|
/**
|
|
* Specify the `href` attribute
|
|
* @default undefined
|
|
*/
|
|
href?: string;
|
|
|
|
/**
|
|
* Specify the icon to render
|
|
* @default undefined
|
|
*/
|
|
icon?: typeof import("svelte").SvelteComponent<any>;
|
|
|
|
/**
|
|
* Obtain a reference to the HTML anchor element
|
|
* @default null
|
|
*/
|
|
ref?: null | HTMLAnchorElement;
|
|
|
|
[key: `data-${string}`]: any;
|
|
}
|
|
|
|
export default class HeaderActionLink extends SvelteComponentTyped<
|
|
HeaderActionLinkProps,
|
|
{ click: WindowEventMap["click"] },
|
|
{ icon: {} }
|
|
> {}
|