carbon-components-svelte/types/ToggleSmall/ToggleSmall.svelte.d.ts
metonym df4ed9d75a
fix(types): use @component comments for deprecation notices (#1111)
The Svelte Language Server allows component-level comments through `<!-- @component ... -->` syntax.

Deprecation notices for components should be moved from the script block to the markup template.
2022-02-19 18:50:25 -08:00

66 lines
1.4 KiB
TypeScript

/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface ToggleSmallProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* Set to `true` to toggle the checkbox input
* @default false
*/
toggled?: boolean;
/**
* Set to `true` to disable checkbox input
* @default false
*/
disabled?: boolean;
/**
* Specify the label for the untoggled state
* @default "Off"
*/
labelA?: string;
/**
* Specify the label for the toggled state
* @default "On"
*/
labelB?: string;
/**
* Specify the label text
* @default ""
*/
labelText?: string;
/**
* Set an id for the input element
* @default "ccs-" + Math.random().toString(36)
*/
id?: string;
/**
* Specify a name attribute for the checkbox input
* @default undefined
*/
name?: string;
}
/**
* @deprecated This component is deprecated.
* Use`<Toggle size="sm" />` instead.
*/
export default class ToggleSmall extends SvelteComponentTyped<
ToggleSmallProps,
{
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
change: WindowEventMap["change"];
keyup: WindowEventMap["keyup"];
focus: WindowEventMap["focus"];
blur: WindowEventMap["blur"];
},
{}
> {}