mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
- use Svelte 3.55.0 since that's the minimum target for SvelteKit and svelte-check - revert to using SvelteComponentTyped for high compatibility. We'll migrate to SvelteComponent after dropping Svelte 3
49 lines
945 B
TypeScript
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: {} }
|
|
> {}
|