mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
chore: complete first pass of apply jsdoc annotations to component props
This commit is contained in:
parent
566a281d81
commit
f30755b237
97 changed files with 2327 additions and 259 deletions
|
@ -1,35 +1,61 @@
|
|||
<script>
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Column let:props><article {...props}>...</article></Column>)
|
||||
* @type {boolean} [as=false]
|
||||
*/
|
||||
export let as = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @type {boolean} [noGutter=false]
|
||||
*/
|
||||
export let noGutter = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @type {boolean} [noGutterLeft=false]
|
||||
*/
|
||||
export let noGutterLeft = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @type {boolean} [noGutterRight=false]
|
||||
*/
|
||||
export let noGutterRight = false;
|
||||
|
||||
/**
|
||||
* Aspect ratio of the column
|
||||
* Specify the aspect ratio of the column
|
||||
* @type {"2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1"} [aspectRatio]
|
||||
*/
|
||||
export let aspectRatio = undefined;
|
||||
|
||||
/**
|
||||
* @typedef {boolean | number} ColumnSize
|
||||
* @typedef {{span?: ColumnSize: offset: number}} ColumnSizeDescriptor
|
||||
* @typedef {{span?: ColumnSize: offset: number;}} ColumnSizeDescriptor
|
||||
* @typedef {ColumnSize | ColumnSizeDescriptor} ColumnBreakpoint
|
||||
*/
|
||||
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [sm] */
|
||||
/** @type {ColumnBreakpoint} [sm] */
|
||||
export let sm = undefined;
|
||||
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [md] */
|
||||
/** @type {ColumnBreakpoint} [md] */
|
||||
export let md = undefined;
|
||||
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [lg] */
|
||||
/** @type {ColumnBreakpoint} [lg] */
|
||||
export let lg = undefined;
|
||||
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [xlg] */
|
||||
/** @type {ColumnBreakpoint} [xlg] */
|
||||
export let xlg = undefined;
|
||||
|
||||
/** @type {ColumnSize | ColumnSizeDescriptor} [max] */
|
||||
/** @type {ColumnBreakpoint} [max] */
|
||||
export let max = undefined;
|
||||
|
||||
/**
|
||||
* Column breakpoints
|
||||
* @constant
|
||||
* @type {string[]}
|
||||
*/
|
||||
const breakpoints = ["sm", "md", "lg", "xlg", "max"];
|
||||
|
||||
$: columnClass = [sm, md, lg, xlg, max]
|
||||
|
|
|
@ -1,10 +1,45 @@
|
|||
<script>
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Grid let:props><header {...props}>...</header></Grid>)
|
||||
* @type {boolean} [as=false]
|
||||
*/
|
||||
export let as = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the condensed variant
|
||||
* @type {boolean} [condensed=false]
|
||||
*/
|
||||
export let condensed = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the narrow variant
|
||||
* @type {boolean} [narrow=false]
|
||||
*/
|
||||
export let narrow = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the fullWidth variant
|
||||
* @type {boolean} [fullWidth=false]
|
||||
*/
|
||||
export let fullWidth = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @type {boolean} [noGutter=false]
|
||||
*/
|
||||
export let noGutter = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @type {boolean} [noGutterLeft=false]
|
||||
*/
|
||||
export let noGutterLeft = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @type {boolean} [noGutterRight=false]
|
||||
*/
|
||||
export let noGutterRight = false;
|
||||
|
||||
$: props = {
|
||||
|
|
|
@ -1,9 +1,39 @@
|
|||
<script>
|
||||
/**
|
||||
* Set to `true` to render a custom HTML element
|
||||
* Props are destructured as `props` in the default slot (e.g. <Row let:props><section {...props}>...</section></Row>)
|
||||
* @type {boolean} [as=false]
|
||||
*/
|
||||
export let as = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the condensed variant
|
||||
* @type {boolean} [condensed=false]
|
||||
*/
|
||||
export let condensed = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the narrow variant
|
||||
* @type {boolean} [narrow=false]
|
||||
*/
|
||||
export let narrow = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the gutter
|
||||
* @type {boolean} [noGutter=false]
|
||||
*/
|
||||
export let noGutter = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the left gutter
|
||||
* @type {boolean} [noGutterLeft=false]
|
||||
*/
|
||||
export let noGutterLeft = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to remove the right gutter
|
||||
* @type {boolean} [noGutterRight=false]
|
||||
*/
|
||||
export let noGutterRight = false;
|
||||
|
||||
$: props = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue