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,31 +1,25 @@
<script>
/**
* Specify alignment of accordion item chevron icon
* @type {"start" | "end"} [align="end"]
* @type {"start" | "end"}
*/
export let align = "end";
/**
* Specify the size of the accordion
* @type {"sm" | "xl"} [size]
* @type {"sm" | "xl"}
*/
export let size = undefined;
/**
* Set to `true` to disable the accordion
* @type {boolean} [disabled=false]
*/
/** Set to `true` to disable the accordion */
export let disabled = false;
/**
* Set to `true` to display the skeleton state
* @type {boolean} [skeleton=false]
*/
/** Set to `true` to display the skeleton state */
export let skeleton = false;
import { setContext } from "svelte";
import { writable } from "svelte/store";
import AccordionSkeleton from "./Accordion.Skeleton.svelte";
import AccordionSkeleton from "./AccordionSkeleton.svelte";
const disableItems = writable(disabled);

View file

@ -2,26 +2,16 @@
/**
* Specify the title of the accordion item heading
* Alternatively, use the named slot "title" (e.g. <div slot="title">...</div>)
* @type {string} [title="title"]
*/
export let title = "title";
/**
* Set to `true` to open the first accordion item
* @type {boolean} [open=false]
*/
/** Set to `true` to open the first accordion item */
export let open = false;
/**
* Set to `true` to disable the accordion item
* @type {boolean} [disabled=false]
*/
/** Set to `true` to disable the accordion item */
export let disabled = false;
/**
* Specify the ARIA label for the accordion item chevron icon
* @type {string} [iconDescription="Expand/Collapse"]
*/
/** Specify the ARIA label for the accordion item chevron icon */
export let iconDescription = "Expand/Collapse";
import { onMount, getContext } from "svelte";

View file

@ -1,26 +1,20 @@
<script>
/**
* Specify the number of accordion items to render
* @type {number} [count=4]
*/
/** Specify the number of accordion items to render */
export let count = 4;
/**
* Specify alignment of accordion item chevron icon
* @type {"start" | "end"} [align="end"]
* @type {"start" | "end"}
*/
export let align = "end";
/**
* Specify the size of the accordion
* @type {"sm" | "xl"} [size]
* @type {"sm" | "xl"}
*/
export let size = undefined;
/**
* Set to `false` to close the first accordion item
* @type {boolean} [open=true]
*/
/** Set to `false` to close the first accordion item */
export let open = true;
import ChevronRight16 from "carbon-icons-svelte/lib/ChevronRight16";

View file

@ -1,3 +1,3 @@
export { default as Accordion } from "./Accordion.svelte";
export { default as AccordionItem } from "./AccordionItem.svelte";
export { default as AccordionSkeleton } from "./Accordion.Skeleton.svelte";
export { default as AccordionSkeleton } from "./AccordionSkeleton.svelte";