carbon-components-svelte/types/DataTable/Table.svelte.d.ts
metonym c6f210899b
feat(data-table): allow custom column widths (#1265)
* feat(data-table): allow header column `width`, `minWidth` values

* Run "yarn build:docs"

* test(data-table): assert width, minWidth properties

* docs(data-table): add "Custom column widths" example
2022-05-14 09:24:24 -07:00

47 lines
912 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;
}
export default class Table extends SvelteComponentTyped<
TableProps,
{},
{ default: {} }
> {}