prp-ui-components
Version:
Package for use components of Pratica Plataforms
26 lines (25 loc) • 768 B
TypeScript
import * as React from 'react';
import './styles.scss';
export type ColumnDefinitionType<T, K extends keyof T> = {
key: K;
header: any;
width?: string;
isSortable?: boolean;
gridArea?: string;
checkbox?: boolean;
radio?: boolean;
selected?: any;
filter?: boolean;
input?: boolean;
};
type TableProps<T, K extends keyof T> = {
data?: T[] | undefined;
columns: ColumnDefinitionType<T, K>[];
onRowClicked?: (data: ColumnDefinitionType<T, K>) => void;
checked?: boolean;
onActionRadio?: (active: boolean) => void;
};
export declare const GenericTable: <T extends {
id: number | string;
}, K extends keyof T>({ data, columns, onRowClicked, onActionRadio, }: TableProps<T, K>) => React.JSX.Element;
export {};