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

teableio / teable / 8538004962

03 Apr 2024 11:36AM CUT coverage: 18.233% (-3.3%) from 21.535%
8538004962

Pull #528

github

web-flow
Merge c1a248a6f into 45ee7ebb3
Pull Request #528: feat: Kanban view

575 of 1136 branches covered (50.62%)

29 of 2908 new or added lines in 83 files covered. (1.0%)

5 existing lines in 5 files now uncovered.

6439 of 35315 relevant lines covered (18.23%)

3.94 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
NEW
1
import type { IAttachmentCellValue } from '@teable/core';
×
NEW
2
import { cn } from '@teable/ui-lib';
×
NEW
3
import { getFileCover } from '../../editor/attachment';
×
NEW
4
import type { ICellValue } from '../type';
×
NEW
5

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

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

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

×
NEW
18
        return (
×
NEW
19
          <div
×
NEW
20
            key={id}
×
NEW
21
            className={cn('h-full border rounded border-slate-200 overflow-hidden', itemClassName)}
×
NEW
22
          >
×
NEW
23
            <img
×
NEW
24
              className="size-full object-contain"
×
NEW
25
              src={getFileCover(mimetype, presignedUrl)}
×
NEW
26
              alt={name}
×
NEW
27
            />
×
NEW
28
          </div>
×
NEW
29
        );
×
NEW
30
      })}
×
NEW
31
    </div>
×
NEW
32
  );
×
NEW
33
};
×
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