mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(data-table-skeleton): support object type for headers
This commit is contained in:
parent
4226535338
commit
a450b83bd8
6 changed files with 53 additions and 24 deletions
10
types/DataTableSkeleton/DataTableSkeleton.d.ts
vendored
10
types/DataTableSkeleton/DataTableSkeleton.d.ts
vendored
|
@ -1,8 +1,12 @@
|
|||
/// <reference types="svelte" />
|
||||
import { DataTableHeader } from "../DataTable/DataTable";
|
||||
|
||||
export interface DataTableSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["table"]> {
|
||||
export interface DataTableSkeletonProps
|
||||
extends DataTableHeader,
|
||||
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["table"]> {
|
||||
/**
|
||||
* Specify the number of columns
|
||||
* Superseded by `headers` if `headers` is a non-empty array
|
||||
* @default 5
|
||||
*/
|
||||
columns?: number;
|
||||
|
@ -32,10 +36,10 @@ export interface DataTableSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLEl
|
|||
|
||||
/**
|
||||
* Set the column headers
|
||||
* If `headers` has one more items, `count` is ignored
|
||||
* Supersedes `columns` if value is a non-empty array
|
||||
* @default []
|
||||
*/
|
||||
headers?: string[];
|
||||
headers?: string[] | Partial<DataTableHeader>[];
|
||||
|
||||
/**
|
||||
* Set to `false` to hide the toolbar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue