Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 589 Bytes

File metadata and controls

31 lines (26 loc) · 589 Bytes

react-native-app-helpers/OfflineTableData

Offline data to be passed to a table.

Usage

import type { OfflineTableData } from "react-native-app-helpers";

type TableRow = {
  readonly columnA: null | string;
  readonly columnB: null | number;
  readonly columnC: 0 | 1 | 2 | 3;
  readonly columnD: null | boolean;
};

const example: OfflineTableData<
  `exampleKeyA` | `exampleKeyB`,
  `exampleKeyC` | `exampleKeyD`,
  TableRow
> = {
  rows: [
    {
      exampleKeyA: 123,
      exampleKeyB: `Example`,
      exampleKeyC: false,
      exampleKeyD: true,
    },
  ],
};