carbon-components-svelte/types/ContentSwitcher/ContentSwitcher.svelte.d.ts
Eric Liu 2f026f792a
feat(typescript)!: support svelte 4 (#1773)
Closes #1753 

The minimum Svelte version required for TypeScript users is now 3.55.
2023-07-19 09:44:56 -07:00

32 lines
785 B
TypeScript

import type { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["div"];
export interface ContentSwitcherProps extends RestProps {
/**
* Set the selected index of the switch item
* @default 0
*/
selectedIndex?: number;
/**
* Specify the size of the content switcher
* @default undefined
*/
size?: "sm" | "xl";
[key: `data-${string}`]: any;
}
export default class ContentSwitcher extends SvelteComponentTyped<
ContentSwitcherProps,
{
change: CustomEvent<number>;
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
},
{ default: {} }
> {}