import { useMantineReactTable } from '../hooks/useMantineReactTable'; import { type MRT_RowData, type MRT_TableInstance, type MRT_TableOptions, type Xor, } from '../types'; import { MRT_TablePaper } from './table/MRT_TablePaper'; type TableInstanceProp = { table: MRT_TableInstance; }; type Props = Xor< TableInstanceProp, MRT_TableOptions >; const isTableInstanceProp = ( props: Props, ): props is TableInstanceProp => (props as TableInstanceProp).table !== undefined; export const MantineReactTable = ( props: Props, ) => { 'use no memo'; let table: MRT_TableInstance; if (isTableInstanceProp(props)) { table = props.table; } else { table = useMantineReactTable(props); } return ; };