@sikka/hawa
Version:
Modern UI Kit made with Tailwind
56 lines (53 loc) • 1.72 kB
TypeScript
import * as React from 'react';
import { RowData, ColumnDef } from '@tanstack/react-table';
export { ColumnDef } from '@tanstack/react-table';
import { D as DirectionType } from '../commonTypes-BtF87PmG.js';
type DataTableProps<DataProps = {}> = {
direction?: DirectionType;
columns: ColumnDef<DataProps>[];
enableSearch?: boolean;
enableHideColumns?: boolean;
enableGoTo?: boolean;
enableSelection?: boolean;
enableFiltering?: boolean;
resetSelection?: boolean;
filters?: {
accessorKey: string;
value: string;
label: string;
}[];
hideHeader?: boolean;
data: DataProps[];
itemsPerPage?: any[];
showCount?: boolean;
showSelectionCount?: boolean;
paginationPosition?: "top" | "bottom";
condensed?: boolean;
isLoading?: boolean;
defaultSort?: string;
translateFn?: any;
bulkActions?: any[];
texts?: {
columns?: string;
searchPlaceholder?: string;
item?: string;
noData?: any;
page?: string;
filter?: string;
of?: string;
total?: string;
goTo?: string;
selectedRows?: string;
bulkAction?: string;
};
};
declare module "@tanstack/table-core" {
interface ColumnMeta<TData extends RowData, TValue> {
padding?: "condensed" | "default" | "noPadding";
sortable?: boolean;
hidden?: boolean;
i18nKey?: string;
}
}
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, resetSelection, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
export { DataTable };