refactor: update/fix JSDoc props

This commit is contained in:
Eric Liu 2020-11-04 06:04:25 -08:00
commit d38e6d8be6
204 changed files with 992 additions and 2359 deletions

View file

@ -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;

View file

@ -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;