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,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]