mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore: use jsdoc to annotate props
This commit is contained in:
parent
51034f24a3
commit
8c1ffd4cb0
5 changed files with 51 additions and 11 deletions
|
@ -1,5 +1,14 @@
|
||||||
<script>
|
<script>
|
||||||
export let align = "end"; // "start" | "end"
|
/**
|
||||||
|
* Specify alignment of accordion item chevron icon
|
||||||
|
* @type {"start" | "end"} [align="end"]
|
||||||
|
*/
|
||||||
|
export let align = "end";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to display skeleton state
|
||||||
|
* @type {boolean} [skeleton=false]
|
||||||
|
*/
|
||||||
export let skeleton = false;
|
export let skeleton = false;
|
||||||
|
|
||||||
import AccordionSkeleton from "./Accordion.Skeleton.svelte";
|
import AccordionSkeleton from "./Accordion.Skeleton.svelte";
|
||||||
|
|
|
@ -1,6 +1,21 @@
|
||||||
<script>
|
<script>
|
||||||
|
/**
|
||||||
|
* Specify title of accordion item heading
|
||||||
|
* Alternatively use the named slot "title"
|
||||||
|
* @type {string} [title="title"]
|
||||||
|
*/
|
||||||
export let title = "title";
|
export let title = "title";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to open the first accordion item
|
||||||
|
* @type {boolean} [open=false]
|
||||||
|
*/
|
||||||
export let open = false;
|
export let open = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the ARIA label for accordion item chevron icon
|
||||||
|
* @type {string} [iconDescription="Expand/Collapse"]
|
||||||
|
*/
|
||||||
export let iconDescription = "Expand/Collapse";
|
export let iconDescription = "Expand/Collapse";
|
||||||
|
|
||||||
import ChevronRight16 from "carbon-icons-svelte/lib/ChevronRight16";
|
import ChevronRight16 from "carbon-icons-svelte/lib/ChevronRight16";
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
<script>
|
<script>
|
||||||
|
/**
|
||||||
|
* Set to `true` to hide breadcrumb trailing slash
|
||||||
|
* @type {boolean} [noTrailingSlash=false]
|
||||||
|
*/
|
||||||
export let noTrailingSlash = false;
|
export let noTrailingSlash = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to display skeleton state
|
||||||
|
* @type {boolean} [skeleton=false]
|
||||||
|
*/
|
||||||
export let skeleton = false;
|
export let skeleton = false;
|
||||||
|
|
||||||
import BreadcrumbSkeleton from "./Breadcrumb.Skeleton.svelte";
|
import BreadcrumbSkeleton from "./Breadcrumb.Skeleton.svelte";
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
<script>
|
<script>
|
||||||
|
/**
|
||||||
|
* Use anchor link
|
||||||
|
* @type {string} [href]
|
||||||
|
*/
|
||||||
export let href = undefined;
|
export let href = undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` if item is the current page
|
||||||
|
* @type {boolean} [isCurrentPage=false]
|
||||||
|
*/
|
||||||
export let isCurrentPage = false;
|
export let isCurrentPage = false;
|
||||||
|
|
||||||
import { Link } from "../Link";
|
import { Link } from "../Link";
|
||||||
|
|
|
@ -6,15 +6,13 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Aspect ratio of the column
|
* Aspect ratio of the column
|
||||||
* @type {("2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1")} [aspectRatio]
|
* @type {"2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1"} [aspectRatio]
|
||||||
*/
|
*/
|
||||||
export let aspectRatio = undefined;
|
export let aspectRatio = undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {(boolean | number)} ColumnSize
|
* @typedef {boolean | number} ColumnSize
|
||||||
* @typedef {Object} ColumnSizeDescriptor
|
* @typedef {{span?: ColumnSize: offset: number}} ColumnSizeDescriptor
|
||||||
* @property {ColumnSize} [ColumnSizeDescriptor.span] Column size
|
|
||||||
* @property {number} [ColumnSizeDescriptor.offset] Column offset
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @type {ColumnSize | ColumnSizeDescriptor} [sm] */
|
/** @type {ColumnSize | ColumnSizeDescriptor} [sm] */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue