@primitives/table

This is A WEB COMPONENT, in the next version we will add native variation.

Usage no npm install needed!

<script type="module">
  import primitivesTable from 'https://cdn.skypack.dev/@primitives/table';
</script>

README

This is A WEB COMPONENT, in the next version we will add native variation.

Table, TableBody, TableBodyCell, TableHead, TableHeadCell, TableRow are use in order to render web tables.

These map to the same corresponding props in Web.

Raw type definitions

Table:

export type TTable = {
  id?: string,
  children?: ReactNode,
  backgroundColor?: string,
  borderColor?: string,
  borderTopWidth?: number,
  borderBottomWidth?: number,
  borderLeftWidth?: number,
  borderRightWidth?: number,
  borderStyle?: string,
}

TableBody:

export type TTableBody = {
  id?: string,
  children?: ReactNode,
}

TableBodyCell:

export type TTableBodyCell = {
  id?: string,
  children?: ReactNode,
  backgroundColor?: string,
  borderColor?: string,
  borderTopWidth?: number,
  borderBottomWidth?: number,
  borderLeftWidth?: number,
  borderRightWidth?: number,
  borderStyle?: string,
}

TableHead:

export type TTableHead = {
  id?: string,
  children?: ReactNode,
}

TableHeadCell:

export type TTableHeadCell = {
  id?: string,
  children?: ReactNode,
  backgroundColor?: string,
  borderColor?: string,
  borderTopWidth?: number,
  borderBottomWidth?: number,
  borderLeftWidth?: number,
  borderRightWidth?: number,
  borderStyle?: string,
}

TableRow:

export type TTableRow = {
  id?: string,
  children?: ReactNode,
}