DefinitelyTyped/types/reactable/index.d.ts
Ferdy Budhidharma bc0c933415 feat(react-dependents): update to TS 2.8 (part 2 of 2) (#27744)
* feat(react-dependents): update to ts 2.8

* fix version mismatches

* remove package.json

* post merge updates

* add package.json back again
2018-08-06 06:28:42 +01:00

62 lines
1.3 KiB
TypeScript

// Type definitions for reactable 0.14
// Project: https://github.com/glittershark/reactable
// Definitions by: Christoph Spielmann <https://github.com/spielc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from 'react';
export interface KeyLabelObject {
key: string;
label: string;
}
export type ColumnsType = string | KeyLabelObject;
export type FilterMethodType = (text: string) => void;
export interface TableComponentProperties<T> {
data?: T[];
className?: string;
columns?: ColumnsType[];
id?: string;
sortable?: string[];
filterable?: string[];
filterBy?: string;
onFilter?: FilterMethodType;
}
export interface ThProperties {
column: string;
className?: string;
}
export interface TrProperties<T> {
data?: T;
className?: string;
}
export interface TdProperties {
column: string;
value?: any;
data?: any;
}
export class Table<T> extends React.Component<TableComponentProperties<T>> {
}
export class Thead extends React.Component {
}
export class Th extends React.Component<ThProperties> {
}
export class Tr<T> extends React.Component<TrProperties<T>> {
}
export class Td extends React.Component<TdProperties> {
}
export class Tfoot extends React.Component {
}