import { type ReactNode } from "react";
export interface TableProps {
children: ReactNode;
/** The number and size of columns. See [grid-template-columns](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns). */
columnLayout: string;
isLoading?: boolean;
isInteractive?: boolean;
border?: boolean;
radius?: boolean;
}
/**
* Outer table component. This should wrap any table header and body in order to
* set the layout context.
*/
export declare function Table(props: TableProps): JSX.Element;
export interface TableHeadProps {
children: ReactNode;
}
/**
* Wrapper for the entire table header. This ensures any rows contained in it have the
* header row style applied.
*/
export declare function TableHead(props: TableHeadProps): JSX.Element;
export interface TableBodyProps {
children: ReactNode;
}
/**
* Wrapper for the entire table body and its rows. This ensures any rows contained in
* it have the body row style applied.
*/
export declare function TableBody(props: TableBodyProps): JSX.Element;
export interface ClickableTableRowProps {
children: ReactNode;
/** Visibly disable the row */
disabled?: boolean;
/** Callback fired when the row is clicked */
onClick?: () => void;
renderLink?: never;
}
export interface LinkTableRowProps {
children: ReactNode;
/** Visibly disable the row */
disabled?: boolean;
onClick?: never;
/** Anchor tag wrapper for the row to enable using any routing library such as next Link or react-router. */
renderLink: (children: ReactNode) => JSX.Element;
}
type TableRowProps = ClickableTableRowProps | LinkTableRowProps;
/**
* A possibly interactable table row. This component is used in
* both the header and the table body. The interactivity works in 1 of 3 ways:
*
* - Not giving any props other than children: The table acts as a static element which you can't interact with
* - Given an onClick prop: fires the onClick callback when the row is clicked
* - Given a renderLink: wraps the **entire** row in the given component. E.g. wrapping it in `react-router-dom` ``
*/
export declare const TableRow: (props: TableRowProps & import("react").RefAttributes) => import("react").ReactElement> | null;
export interface TableCellProps {
children?: ReactNode;
/** How to align the content in the cell. Note that undefined defaults to start */
align?: "center" | "end";
/** Whether the content of the cell is interactive, this disables the link properties for that cell. Defaults to `false`. */
interactive?: boolean;
alignItems?: "center" | "flex-start" | "flex-end";
}
/**
* Table cells wrap the individual content of the table.
*/
export declare function TableCell(props: TableCellProps): JSX.Element;
export {};