mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat(types): use the SvelteComponentTyped interface in the TypeScript definitions (#515)
This commit is contained in:
parent
4e4234f83d
commit
bcd28de86e
161 changed files with 6379 additions and 6362 deletions
16
types/RadioButton/RadioButton.d.ts
vendored
16
types/RadioButton/RadioButton.d.ts
vendored
|
@ -1,6 +1,8 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface RadioButtonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
export interface RadioButtonProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Specify the value of the radio button
|
||||
* @default ""
|
||||
|
@ -56,10 +58,8 @@ export interface RadioButtonProps extends svelte.JSX.HTMLAttributes<HTMLElementT
|
|||
ref?: null | HTMLInputElement;
|
||||
}
|
||||
|
||||
export default class RadioButton {
|
||||
$$prop_def: RadioButtonProps;
|
||||
$$slot_def: {};
|
||||
|
||||
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
||||
export default class RadioButton extends SvelteComponentTyped<
|
||||
RadioButtonProps,
|
||||
{ change: WindowEventMap["change"] },
|
||||
{}
|
||||
> {}
|
||||
|
|
24
types/RadioButton/RadioButtonSkeleton.d.ts
vendored
24
types/RadioButton/RadioButtonSkeleton.d.ts
vendored
|
@ -1,14 +1,16 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface RadioButtonSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {}
|
||||
export interface RadioButtonSkeletonProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {}
|
||||
|
||||
export default class RadioButtonSkeleton {
|
||||
$$prop_def: RadioButtonSkeletonProps;
|
||||
$$slot_def: {};
|
||||
|
||||
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
||||
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
|
||||
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
|
||||
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
||||
export default class RadioButtonSkeleton extends SvelteComponentTyped<
|
||||
RadioButtonSkeletonProps,
|
||||
{
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
},
|
||||
{}
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue