@payfit/unity-components
Version:
38 lines (37 loc) • 1.71 kB
TypeScript
import { PropsWithChildren } from 'react';
export declare const dataTableRoot: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
export type DataTableRootProps = PropsWithChildren;
/**
* The DataTableRoot component provides positioning and layout context for DataTable components.
* It serves as the container for DataTable, DataTableBulkActions, and other related components.
* @param {DataTableRootProps} props - The props for the DataTableRoot component
* @example
* ```tsx
* import { DataTableRoot, DataTable, DataTableBulkActions } from '@payfit/unity-components'
*
* function Example() {
* return (
* <DataTableRoot>
* <DataTable table={table}>
* {row => (
* <TableRow key={row.id} isSelected={row.getIsSelected()}>
* {row.getVisibleCells().map(cell => (
* <TableCell key={cell.id}>
* {flexRender(cell.column.columnDef.cell, cell.getContext())}
* </TableCell>
* ))}
* </TableRow>
* )}
* </DataTable>
* <DataTableBulkActions table={table} actions={actions} />
* </DataTableRoot>
* )
* }
* ```
* @see {@link DataTableRootProps} for all available props
* @see Source code in [Github](https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/data-table)
*/
declare const DataTableRoot: import('react').ForwardRefExoticComponent<{
children?: import('react').ReactNode | undefined;
} & import('react').RefAttributes<HTMLDivElement>>;
export { DataTableRoot };