wass-rct-ui
Version:
A lightweight and customizable WASS Rct UI component library for modern web applications.
37 lines (36 loc) • 1.21 kB
TypeScript
/**
* @file wass-rct-ui
* @description A reusable Title component that supports dynamic heading levels.
* @author Web Apps Software Solutions
* @copyright © 2024 Web Apps Software Solutions. All rights reserved.
* @license MIT
* @repository https://github.com/WebAppSoftNK/wass-rct-ui
*/
import * as React from "react";
import { ColumnType, FontWeight, TextColorVariant } from "../types";
export interface TableColumnProps<T> {
header: string;
accessor: keyof T;
type?: ColumnType;
dateFormat?: string;
textColor?: TextColorVariant;
fontWeight?: FontWeight;
render?: (value: T[keyof T], row: T) => React.ReactNode;
onTap?: (row: T) => void;
}
export interface TableProps<T> {
data: T[];
columns: TableColumnProps<T>[];
itemsPerPage?: number;
totalCount: number;
border?: boolean;
striped?: boolean;
narrow?: boolean;
foverable?: boolean;
fullwidth?: boolean;
isContainer?: boolean;
className?: string;
onPageChange: (page: number) => void;
}
declare const Table: <T>({ data, columns, itemsPerPage, totalCount, onPageChange, ...props }: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
export default Table;