UNPKG

@hypothesis/frontend-shared

Version:

Shared components, styles and utilities for Hypothesis projects

21 lines (20 loc) 812 B
import type { JSX } from 'preact'; import type { PresentationalProps } from '../../types'; export type TableProps = PresentationalProps & { /** This table has a sticky header */ stickyHeader?: boolean; /** Sets accessible aria-label */ title: string; /** This table has click-able, focus-able rows */ interactive?: boolean; /** Turn off outer table borders */ borderless?: boolean; /** Show a different background every other row */ striped?: boolean; /** Show grid lines around table cells */ grid?: boolean; } & Omit<JSX.HTMLAttributes<HTMLElement>, 'rows'>; /** * Render table content */ export default function Table({ children, classes, elementRef, title, interactive, stickyHeader, borderless, striped, grid, ...htmlAttributes }: TableProps): JSX.Element;