mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21: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,17 +1,52 @@
|
|||
<script>
|
||||
/**
|
||||
* Specify the data table headers
|
||||
* @type {{key: string; value: string;}} [headers=[]]
|
||||
*/
|
||||
export let headers = [];
|
||||
|
||||
/**
|
||||
* Specify the rows the data table should render
|
||||
* keys defined in `headers` are used for the row ids
|
||||
* @type {Object[]} [rows=[]]
|
||||
*/
|
||||
export let rows = [];
|
||||
|
||||
/**
|
||||
* Set the size of the data table
|
||||
* @type {"compact" | "short" | "tall"} [size]
|
||||
*/
|
||||
export let size = undefined;
|
||||
|
||||
/**
|
||||
* Specify the title of the data table
|
||||
* @type {string} [title=""]
|
||||
*/
|
||||
export let title = "";
|
||||
|
||||
/**
|
||||
* Specify the description of the data table
|
||||
* @type {string} [description=""]
|
||||
*/
|
||||
export let description = "";
|
||||
|
||||
/**
|
||||
* Set to `true` to use zebra styles
|
||||
* @type {boolean} [zebra=false]
|
||||
*/
|
||||
export let zebra = false;
|
||||
|
||||
/**
|
||||
* Set to `true` for the sortable variant
|
||||
* @type {boolean} [sortable=false]
|
||||
*/
|
||||
export let sortable = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable a sticky header
|
||||
* @type {boolean} [stickyHeader=false]
|
||||
*/
|
||||
export let stickyHeader = false;
|
||||
export let rows = [];
|
||||
export let headers = [];
|
||||
|
||||
import { createEventDispatcher, setContext } from "svelte";
|
||||
import { writable, derived } from "svelte/store";
|
||||
|
|
|
@ -1,9 +1,38 @@
|
|||
<script>
|
||||
export let size = undefined; // "compact" | "short" | "tall"
|
||||
/**
|
||||
* Set the size of the table
|
||||
* @type {"compact" | "short" | "tall"} [size]
|
||||
*/
|
||||
export let size = undefined;
|
||||
|
||||
/**
|
||||
* Set to `true` to use zebra styles
|
||||
* @type {boolean} [zebra=false]
|
||||
*/
|
||||
export let zebra = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to use static width
|
||||
* @type {boolean} [useStaticWidth=false]
|
||||
*/
|
||||
export let useStaticWidth = false;
|
||||
|
||||
/**
|
||||
* Set to `true` for the bordered variant
|
||||
* @type {boolean} [shouldShowBorder=false]
|
||||
*/
|
||||
export let shouldShowBorder = false;
|
||||
|
||||
/**
|
||||
* Set to `true` for the sortable variant
|
||||
* @type {boolean} [sortable=false]
|
||||
*/
|
||||
export let sortable = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable a sticky header
|
||||
* @type {boolean} [stickyHeader=false]
|
||||
*/
|
||||
export let stickyHeader = false;
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,7 +1,21 @@
|
|||
<script>
|
||||
export let stickyHeader = false;
|
||||
/**
|
||||
* Specify the title of the data table
|
||||
* @type {string} [title=""]
|
||||
*/
|
||||
export let title = "";
|
||||
|
||||
/**
|
||||
* Specify the description of the data table
|
||||
* @type {string} [description=""]
|
||||
*/
|
||||
export let description = "";
|
||||
|
||||
/**
|
||||
* Set to `true` to enable a sticky header
|
||||
* @type {boolean} [stickyHeader=false]
|
||||
*/
|
||||
export let stickyHeader = false;
|
||||
</script>
|
||||
|
||||
<div
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
<script>
|
||||
/**
|
||||
* Specify the `scope` attribute
|
||||
* @type {string} [scope="col"]
|
||||
*/
|
||||
export let scope = "col";
|
||||
|
||||
/**
|
||||
* Override the default id translations
|
||||
* @type {() => string;} [translateWithId = () => "";]
|
||||
*/
|
||||
export let translateWithId = () => "";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<script>
|
||||
/**
|
||||
* Set to `true` to select the row
|
||||
* @type {boolean} [isSelected=false]
|
||||
*/
|
||||
export let isSelected = false;
|
||||
|
||||
// TODO: include ariaLabel, onExpand, isExpanded, isSelected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue