mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
* chore(deps-dev): upgrade sveld to v0.10.2 * feat(types): regenerate types using sveld@0.10.2 * fix(types): update @extends to use .svelte extension
61 lines
1.2 KiB
TypeScript
61 lines
1.2 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
|
|
*/
|
|
name?: string;
|
|
}
|
|
|
|
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"];
|
|
},
|
|
{}
|
|
> {}
|