carbon-components-svelte/types/Link/Link.svelte.d.ts
Eric Liu 0d78c30b9d
fix(types): include @default annotations for props that are undefined by default (#1020)
* chore(deps-dev): upgrade sveld to v0.12.1

* Run "yarn build:lib"

* Re-run "yarn build:lib"
2022-01-20 19:29:06 -08:00

59 lines
1.2 KiB
TypeScript

/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface LinkProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["p"]> {
/**
* Specify the size of the link
* @default undefined
*/
size?: "sm" | "lg";
/**
* Specify the href value
* @default undefined
*/
href?: string;
/**
* Set to `true` to use the inline variant
* @default false
*/
inline?: boolean;
/**
* Specify the icon to render
* `inline` must be `false`
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent;
/**
* Set to `true` to disable the checkbox
* @default false
*/
disabled?: boolean;
/**
* Set to `true` to allow visited styles
* @default false
*/
visited?: boolean;
/**
* Obtain a reference to the top-level HTML element
* @default null
*/
ref?: null | HTMLAnchorElement | HTMLParagraphElement;
}
export default class Link extends SvelteComponentTyped<
LinkProps,
{
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
},
{ default: {} }
> {}