mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 03:49:34 +00:00
refactor(types): use typed SvelteComponent interface for typing components
This commit is contained in:
parent
4226535338
commit
dab82d3479
156 changed files with 1379 additions and 1667 deletions
18
types/Tabs/Tabs.d.ts
vendored
18
types/Tabs/Tabs.d.ts
vendored
|
@ -1,4 +1,5 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponent } from "svelte";
|
||||
|
||||
export interface TabsProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
|
@ -26,15 +27,8 @@ export interface TabsProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameM
|
|||
triggerHref?: string;
|
||||
}
|
||||
|
||||
export default class Tabs {
|
||||
$$prop_def: TabsProps;
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
content: {};
|
||||
};
|
||||
|
||||
$on(eventname: "keypress", cb: (event: WindowEventMap["keypress"]) => void): () => void;
|
||||
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
||||
$on(eventname: "change", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
||||
export default class Tabs extends SvelteComponent<
|
||||
TabsProps,
|
||||
{ keypress: WindowEventMap["keypress"]; click: WindowEventMap["click"]; change: CustomEvent<any> },
|
||||
{ default: {}; content: {} }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue