npm.io
3.1.0 • Published 5 years ago

@primitives/table

Licence
MIT
Version
3.1.0
Deps
2
Size
50 kB
Vulns
0
Weekly
0
Stars
52

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,
}