mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-19 03:56:42 +08:00
### What problem does this PR solve? Feat: Add FilesTable #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
27
web/src/components/table-skeleton.tsx
Normal file
27
web/src/components/table-skeleton.tsx
Normal file
@ -0,0 +1,27 @@
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { SkeletonCard } from './skeleton-card';
|
||||
import { TableCell, TableRow } from './ui/table';
|
||||
|
||||
type IProps = { columnsLength: number };
|
||||
|
||||
function Row({ children, columnsLength }: PropsWithChildren & IProps) {
|
||||
return (
|
||||
<TableRow>
|
||||
<TableCell colSpan={columnsLength} className="h-24 text-center ">
|
||||
{children}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
}
|
||||
|
||||
export function TableSkeleton({ columnsLength }: { columnsLength: number }) {
|
||||
return (
|
||||
<Row columnsLength={columnsLength}>
|
||||
<SkeletonCard></SkeletonCard>
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
|
||||
export function TableEmpty({ columnsLength }: { columnsLength: number }) {
|
||||
return <Row columnsLength={columnsLength}>No results.</Row>;
|
||||
}
|
||||
Reference in New Issue
Block a user