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>
|
||||
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;
|
||||
|
||||
import AccordionSkeleton from "./Accordion.Skeleton.svelte";
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
<script>
|
||||
/**
|
||||
* Specify title of accordion item heading
|
||||
* Alternatively use the named slot "title"
|
||||
* @type {string} [title="title"]
|
||||
*/
|
||||
export let title = "title";
|
||||
|
||||
/**
|
||||
* Set to `true` to open the first accordion item
|
||||
* @type {boolean} [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";
|
||||
|
||||
import ChevronRight16 from "carbon-icons-svelte/lib/ChevronRight16";
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
<script>
|
||||
/**
|
||||
* Set to `true` to hide breadcrumb trailing slash
|
||||
* @type {boolean} [noTrailingSlash=false]
|
||||
*/
|
||||
export let noTrailingSlash = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to display skeleton state
|
||||
* @type {boolean} [skeleton=false]
|
||||
*/
|
||||
export let skeleton = false;
|
||||
|
||||
import BreadcrumbSkeleton from "./Breadcrumb.Skeleton.svelte";
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
<script>
|
||||
/**
|
||||
* Use anchor link
|
||||
* @type {string} [href]
|
||||
*/
|
||||
export let href = undefined;
|
||||
|
||||
/**
|
||||
* Set to `true` if item is the current page
|
||||
* @type {boolean} [isCurrentPage=false]
|
||||
*/
|
||||
export let isCurrentPage = false;
|
||||
|
||||
import { Link } from "../Link";
|
||||
|
|
|
@ -6,30 +6,28 @@
|
|||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* @typedef {(boolean | number)} ColumnSize
|
||||
* @typedef {Object} ColumnSizeDescriptor
|
||||
* @property {ColumnSize} [ColumnSizeDescriptor.span] Column size
|
||||
* @property {number} [ColumnSizeDescriptor.offset] Column offset
|
||||
* @typedef {boolean | number} ColumnSize
|
||||
* @typedef {{span?: ColumnSize: offset: number}} ColumnSizeDescriptor
|
||||
*/
|
||||
|
||||
/** @type {ColumnSize|ColumnSizeDescriptor} [sm] */
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [sm] */
|
||||
export let sm = undefined;
|
||||
|
||||
/** @type {ColumnSize|ColumnSizeDescriptor} [md] */
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [md] */
|
||||
export let md = undefined;
|
||||
|
||||
/** @type {ColumnSize|ColumnSizeDescriptor} [lg] */
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [lg] */
|
||||
export let lg = undefined;
|
||||
|
||||
/** @type {ColumnSize|ColumnSizeDescriptor} [xlg] */
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [xlg] */
|
||||
export let xlg = undefined;
|
||||
|
||||
/** @type {ColumnSize|ColumnSizeDescriptor} [max] */
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [max] */
|
||||
export let max = undefined;
|
||||
|
||||
const breakpoints = ["sm", "md", "lg", "xlg", "max"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue