chore: complete first pass of apply jsdoc annotations to component props

This commit is contained in:
Eric Liu 2020-07-26 17:42:12 -07:00
commit f30755b237
97 changed files with 2327 additions and 259 deletions

View file

@ -1,11 +1,33 @@
<script>
/**
* Specify the select value
* @type {string} [value=""]
*/
export let value = "";
export let name = undefined;
/**
* Set to `true` to disable the select
* @type {boolean} [disabled=false]
*/
export let disabled = false;
/**
* Specify the ARIA label for the chevron icon
* @type {string} [iconDescription="Expand/Collapse"]
*/
export let iconDescription = "Open list of options";
/**
* Specify the label text
* @type {string} [labelText=""]
*/
export let labelText = "";
export let hideLabel = true;
/**
* Set to `true` to visually hide the label text
* @type {boolean} [hideLabel=false]
*/
export let hideLabel = false;
/**
* Set an id for the select element
@ -13,6 +35,18 @@
*/
export let id = "ccs-" + Math.random().toString(36);
/**
* Specify a name attribute for the select element
* @type {string} [name]
*/
export let name = undefined;
/**
* Obtain a reference to the select HTML element
* @type {null | HTMLSelectElement} [ref=null]
*/
export let ref = null;
import { setContext } from "svelte";
import { writable } from "svelte/store";
import ChevronDownGlyph from "carbon-icons-svelte/lib/ChevronDownGlyph";
@ -43,6 +77,7 @@
{/if}
<!-- svelte-ignore a11y-no-onchange -->
<select
bind:this={ref}
{id}
{name}
{disabled}