The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/GenericTable/GenericTable.tsx

23 lines
772 B

import { Box, Table } from '@rocket.chat/fuselage';
import type { ReactNode, TableHTMLAttributes } from 'react';
import React, { forwardRef } from 'react';
import ScrollableContentWrapper from '../ScrollableContentWrapper';
type GenericTableProps = {
fixed?: boolean;
children: ReactNode;
} & TableHTMLAttributes<HTMLTableElement>;
export const GenericTable = forwardRef<HTMLElement, GenericTableProps>(function GenericTable({ fixed = true, children, ...props }, ref) {
return (
<Box mi='neg-x24' pi='x24' flexShrink={1} flexGrow={1} ref={ref} overflow='hidden'>
<ScrollableContentWrapper overflowX>
{/* TODO: Fix fuselage */}
<Table fixed={fixed} sticky {...(props as any)}>
{children}
</Table>
</ScrollableContentWrapper>
</Box>
);
});