mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
35 lines
862 B
TypeScript
35 lines
862 B
TypeScript
import type { SvelteComponentTyped } from "svelte";
|
|
import type { SvelteHTMLElements } from "svelte/elements";
|
|
|
|
type $RestProps = SvelteHTMLElements["a"];
|
|
|
|
type $Props = {
|
|
/**
|
|
* Set the `href` to use an anchor link
|
|
* @default undefined
|
|
*/
|
|
href?: string;
|
|
|
|
/**
|
|
* Specify the size of button skeleton
|
|
* @default "default"
|
|
*/
|
|
size?: "default" | "field" | "small" | "lg" | "xl";
|
|
|
|
[key: `data-${string}`]: any;
|
|
};
|
|
|
|
export type ButtonSkeletonProps = Omit<$RestProps, keyof $Props> & $Props;
|
|
|
|
export default class ButtonSkeleton extends SvelteComponentTyped<
|
|
ButtonSkeletonProps,
|
|
{
|
|
click: WindowEventMap["click"];
|
|
focus: WindowEventMap["focus"];
|
|
blur: WindowEventMap["blur"];
|
|
mouseover: WindowEventMap["mouseover"];
|
|
mouseenter: WindowEventMap["mouseenter"];
|
|
mouseleave: WindowEventMap["mouseleave"];
|
|
},
|
|
{}
|
|
> {}
|