carbon-components-svelte/types/DataTable/Table.svelte.d.ts
Eric Liu 7fdc2ef7f0
fix(types): allow data-* attributes for props forwarded to HTML elements (#1741)
* chore(deps-dev): upgrade `sveld` to v0.18.1

* Run "yarn build:docs"

* test: assert that `data-*` attributes are valid
2023-07-08 16:41:44 -07:00

49 lines
945 B
TypeScript

/// <reference types="svelte" />
import type { SvelteComponentTyped } from "svelte";
export interface TableProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["section"]> {
/**
* Set the size of the table
* @default undefined
*/
size?: "compact" | "short" | "medium" | "tall";
/**
* Set to `true` to use zebra styles
* @default false
*/
zebra?: boolean;
/**
* Set to `true` to use static width
* @default false
*/
useStaticWidth?: boolean;
/**
* Set to `true` for the sortable variant
* @default false
*/
sortable?: boolean;
/**
* Set to `true` to enable a sticky header
* @default false
*/
stickyHeader?: boolean;
/**
* Set the style attribute on the `table` element
* @default undefined
*/
tableStyle?: string;
[key: `data-${string}`]: any;
}
export default class Table extends SvelteComponentTyped<
TableProps,
{},
{ default: {} }
> {}