@porsche-design-system/components-react
Version:
Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.
55 lines (54 loc) • 2.6 kB
TypeScript
import type { BaseProps } from '../../BaseProps';
import type { TableLayout, TableUpdateEventDetail } from '../types';
export type PTableProps = BaseProps & {
/**
* Sets a screen-reader-only accessible caption that describes the table's content; it is not visible in the browser. Use an element with `slot="caption"` for a visible caption instead.
*/
caption?: string;
/**
* Reduces the cell padding and spacing for a more condensed table layout in data-dense UIs.
* @default false
*/
compact?: boolean;
/**
* Controls the CSS `table-layout` algorithm: `auto` sizes columns to fit their content, `fixed` distributes width equally.
* @default 'auto'
*/
layout?: TableLayout;
/**
* Emitted when the user clicks a sortable column header, carrying the new sort configuration in the event detail.
*/
onUpdate?: (event: CustomEvent<TableUpdateEventDetail>) => void;
/**
* @experimental Makes the scroll position indicator sticky at the viewport edge while scrolling, indicating overflow in the table.
* @default false
*/
sticky?: boolean;
};
export declare const PTable: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
/**
* Sets a screen-reader-only accessible caption that describes the table's content; it is not visible in the browser. Use an element with `slot="caption"` for a visible caption instead.
*/
caption?: string;
/**
* Reduces the cell padding and spacing for a more condensed table layout in data-dense UIs.
* @default false
*/
compact?: boolean;
/**
* Controls the CSS `table-layout` algorithm: `auto` sizes columns to fit their content, `fixed` distributes width equally.
* @default 'auto'
*/
layout?: TableLayout;
/**
* Emitted when the user clicks a sortable column header, carrying the new sort configuration in the event detail.
*/
onUpdate?: (event: CustomEvent<TableUpdateEventDetail>) => void;
/**
* @experimental Makes the scroll position indicator sticky at the viewport edge while scrolling, indicating overflow in the table.
* @default false
*/
sticky?: boolean;
} & {
children?: import("react").ReactNode | undefined;
} & import("react").RefAttributes<HTMLElement>>;