import * as React from "react"; import Pagination from "../pagination"; export declare type sortOrderType = "ascends" | "descends"; export interface OnRowReturn { onClick?: (event: React.MouseEvent) => void; onContextMenu?: (event: React.MouseEvent) => void; onMouseEnter?: (event: React.MouseEvent) => void; onMouseLeave?: (event: React.MouseEvent) => void; } export declare type ColumnType = { title: string; dataIndex: string; key: string; render?: (data?: any) => React.ReactNode; sorter?: (a: any, b: any, sortOrder: sortOrderType | undefined) => any; defaultSortOrder?: sortOrderType; }; interface Pagination { total: number; currentPage: number; pageSize: number; } interface TableProps { /**Data record array to be displayed */ dataSource: any[]; /** Columns of table */ columns: any[]; /** callback to be executed when any row is clicked */ onRow?: (record: any, rowIndex: string) => OnRowReturn; /** Config of pagination. You can ref pagination document * at https://mint-ui.netlify.com/?path=/story/pagination--basic * hide it by setting it to false */ pagination?: Pagination | boolean; /** Loading status of table */ loading?: boolean; /** Callback executed when pagination, sorting or filters are changed */ onChange?: (pagination: any, sorter: any, filters?: any, extra?: any) => void; } export interface ActiveSort { column: ColumnType; order: sortOrderType; } export declare const Table: ({ dataSource, columns, onRow, pagination, loading, onChange }: TableProps) => JSX.Element; export default Table;