carbon-components-svelte/types/DataTable/Table.svelte.d.ts
Eric Liu 2f026f792a
feat(typescript)!: support svelte 4 (#1773)
Closes #1753 

The minimum Svelte version required for TypeScript users is now 3.55.
2023-07-19 09:44:56 -07:00

50 lines
985 B
TypeScript

import type { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["section"];
export interface TableProps extends RestProps {
/**
* 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,
Record<string, any>,
{ default: {} }
> {}