mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
41 lines
845 B
TypeScript
41 lines
845 B
TypeScript
/// <reference types="svelte" />
|
|
import type { SvelteComponentTyped } from "svelte";
|
|
|
|
export interface SideNavLinkProps
|
|
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> {
|
|
/**
|
|
* Set to `true` to select the current link
|
|
* @default false
|
|
*/
|
|
isSelected?: boolean;
|
|
|
|
/**
|
|
* Specify the `href` attribute
|
|
* @default undefined
|
|
*/
|
|
href?: string;
|
|
|
|
/**
|
|
* Specify the text
|
|
* @default undefined
|
|
*/
|
|
text?: string;
|
|
|
|
/**
|
|
* Specify the icon to render
|
|
* @default undefined
|
|
*/
|
|
icon?: typeof import("svelte").SvelteComponent;
|
|
|
|
/**
|
|
* Obtain a reference to the HTML anchor element
|
|
* @default null
|
|
*/
|
|
ref?: null | HTMLAnchorElement;
|
|
}
|
|
|
|
export default class SideNavLink extends SvelteComponentTyped<
|
|
SideNavLinkProps,
|
|
{ click: WindowEventMap["click"] },
|
|
{ default: {}; icon: {} }
|
|
> {}
|