import styled from '@emotion/styled'; import DateTime from 'sentry/components/dateTime'; import AttachmentUrl from 'sentry/components/events/attachmentUrl'; import EventAttachmentActions from 'sentry/components/events/eventAttachmentActions'; import FileSize from 'sentry/components/fileSize'; import Link from 'sentry/components/links/link'; import {t} from 'sentry/locale'; import type {IssueAttachment} from 'sentry/types'; import {types} from 'sentry/views/issueDetails/groupEventAttachments/types'; type Props = { attachment: IssueAttachment; groupId: string; isDeleted: boolean; onDelete: (attachmentId: string) => void; orgId: string; projectSlug: string; }; function GroupEventAttachmentsTableRow({ attachment, projectSlug, onDelete, isDeleted, orgId, groupId, }: Props) { return (
{attachment.name}
·{' '} {attachment.event_id}
{types[attachment.type] || t('Other')} {url => !isDeleted ? ( ) : null }
); } const TableRow = styled('tr')<{isDeleted: boolean}>` opacity: ${p => (p.isDeleted ? 0.3 : 1)}; td { text-decoration: ${p => (p.isDeleted ? 'line-through' : 'normal')}; } `; const ActionsWrapper = styled('div')` display: inline-block; `; export default GroupEventAttachmentsTableRow;