• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 10265660624

06 Aug 2024 11:29AM UTC coverage: 17.548% (-0.2%) from 17.734%
10265660624

Pull #793

github

web-flow
Merge 055f7bbe6 into 1df1bc808
Pull Request #793: feat: record history

1387 of 2823 branches covered (49.13%)

6 of 1033 new or added lines in 43 files covered. (0.58%)

34 existing lines in 5 files now uncovered.

14088 of 80281 relevant lines covered (17.55%)

1.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/sdk/src/components/cell-value/cell-attachment/CellAttachment.tsx
1
import type { IAttachmentCellValue } from '@teable/core';
×
2
import { cn } from '@teable/ui-lib';
×
3
import { getFileCover } from '../../editor/attachment';
×
4
import type { ICellValue } from '../type';
×
5

×
6
interface ICellAttachment extends ICellValue<IAttachmentCellValue> {
×
7
  itemClassName?: string;
×
8
}
×
9

×
10
export const CellAttachment = (props: ICellAttachment) => {
×
11
  const { value, className, style, itemClassName } = props;
×
12

×
13
  return (
×
NEW
14
    <div className={cn('flex gap-1 flex-wrap', className)} style={style}>
×
15
      {value?.map((attachment) => {
×
16
        const { id, name, mimetype, presignedUrl } = attachment;
×
17

×
18
        return (
×
19
          <div
×
20
            key={id}
×
NEW
21
            className={cn(
×
NEW
22
              'shrink-0 h-7 border rounded border-slate-200 overflow-hidden',
×
NEW
23
              itemClassName
×
NEW
24
            )}
×
25
          >
×
26
            <img
×
27
              className="size-full object-contain"
×
28
              src={getFileCover(mimetype, presignedUrl)}
×
29
              alt={name}
×
30
            />
×
31
          </div>
×
32
        );
×
33
      })}
×
34
    </div>
×
35
  );
×
36
};
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc