@airplane/views
Version:
A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.
15 lines (14 loc) • 994 B
TypeScript
import * as React from "react";
import { CellProps, Column, Row } from "react-table";
export type CellType = "boolean" | "number" | "date" | "datetime" | "string" | "json" | "select" | "link";
export declare const Cell: React.MemoExoticComponent<(<TRowData extends object>({ value: initialValue, row, column: { id, canEdit, type, wrap, Component, typeOptions, EditComponent }, updateData, dirtyCells, }: import("react-table").TableInstance<TRowData> & {
column: import("react-table").ColumnInstance<TRowData>;
row: Row<TRowData>;
cell: import("react-table").Cell<TRowData, any>;
value: any;
} & {
updateData: (row: Row<TRowData>, columnId: string, value: unknown) => void;
dirtyCells: Record<string, Set<string>>;
}) => import("react/jsx-runtime").JSX.Element)>;
export declare function getDefaultCellType(value: unknown, typeOptions: Column["typeOptions"]): CellType;
export declare const dateTimeSort: (rowA: Row<any>, rowB: Row<any>, columnID: string) => 1 | 0 | -1;