mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
refactor: update/fix JSDoc props
This commit is contained in:
parent
3c04f122b0
commit
d38e6d8be6
204 changed files with 992 additions and 2359 deletions
|
@ -1,19 +1,17 @@
|
|||
<script>
|
||||
/**
|
||||
* Set the selected index of the switch item
|
||||
* @type {number} [selectedIndex=0]
|
||||
* @event {number} change
|
||||
*/
|
||||
|
||||
/** Set the selected index of the switch item */
|
||||
export let selectedIndex = 0;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable the light variant
|
||||
* @type {boolean} [light=false]
|
||||
*/
|
||||
/** Set to `true` to enable the light variant */
|
||||
export let light = false;
|
||||
|
||||
/**
|
||||
* Specify the size of the content switcher
|
||||
* @type {"sm" | "xl"} [size]
|
||||
* @type {"sm" | "xl"}
|
||||
*/
|
||||
export let size = undefined;
|
||||
|
||||
|
|
|
@ -2,31 +2,24 @@
|
|||
/**
|
||||
* Specify the switch text
|
||||
* Alternatively, use the named slot "text" (e.g. <span slot="text">...</span>)
|
||||
* @type {string} [text="Provide text"]
|
||||
*/
|
||||
export let text = "Provide text";
|
||||
|
||||
/**
|
||||
* Set to `true` for the switch to be selected
|
||||
* @type {boolean} [selected=false]
|
||||
*/
|
||||
/** Set to `true` for the switch to be selected */
|
||||
export let selected = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to disable the switch
|
||||
* @type {boolean} [disabled=false]
|
||||
*/
|
||||
/** Set to `true` to disable the switch */
|
||||
export let disabled = false;
|
||||
|
||||
/**
|
||||
* Set an id for the button element
|
||||
* @type {string} [id]
|
||||
* @type {string}
|
||||
*/
|
||||
export let id = "ccs-" + Math.random().toString(36);
|
||||
|
||||
/**
|
||||
* Obtain a reference to the button HTML element
|
||||
* @type {null | HTMLButtonElement} [ref=null]
|
||||
* @type {null | HTMLButtonElement}
|
||||
*/
|
||||
export let ref = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue