ar-design
Version:
AR Design is a (react | nextjs) ui library.
37 lines (36 loc) • 1.26 kB
TypeScript
import React, { Dispatch, SetStateAction } from "react";
import { TableColumnType } from "../../../../libs/types";
import { Config } from "../IProps";
interface IProps<T extends object> {
data: T[];
columns: TableColumnType<T>[];
refs: {
_checkboxItems: React.MutableRefObject<(HTMLInputElement | null)[]>;
_selectionItems: React.MutableRefObject<T[]>;
};
states: {
setSelectAll: {
get: boolean;
set: Dispatch<SetStateAction<boolean>>;
};
showSubitems: {
get: {
[key: string]: boolean;
};
set: Dispatch<React.SetStateAction<{
[key: string]: boolean;
}>>;
};
};
methods: {
trackBy?: (item: T) => string;
selections?: (selectionItems: T[]) => void;
onDnD?: (item: T[]) => void;
onEditable?: (item: T, trackByValue: string, currentKey?: keyof T | null) => void;
rowBackgroundColor?: (item: T) => string;
};
config: Config<T>;
}
declare function TBody<T extends object>({ data, columns, refs, methods, states, config }: IProps<T>): React.JSX.Element | React.JSX.Element[];
declare const _default: typeof TBody;
export default _default;