import {Fragment} from 'react'; import styled from '@emotion/styled'; import Access from 'sentry/components/acl/access'; import {Role} from 'sentry/components/acl/role'; import Button from 'sentry/components/button'; import ButtonBar from 'sentry/components/buttonBar'; import Confirm from 'sentry/components/confirm'; import FileSize from 'sentry/components/fileSize'; import Link from 'sentry/components/links/link'; import Tag from 'sentry/components/tag'; import TimeSince from 'sentry/components/timeSince'; import Tooltip from 'sentry/components/tooltip'; import {IconClock, IconDelete, IconDownload} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import space from 'sentry/styles/space'; import {Artifact} from 'sentry/types'; type Props = { artifact: Artifact; downloadRole: string; downloadUrl: string; onDelete: (id: string) => void; orgSlug: string; }; const SourceMapsArtifactRow = ({ artifact, onDelete, downloadUrl, downloadRole, orgSlug, }: Props) => { const {name, size, dateCreated, id, dist} = artifact; const handleDeleteClick = () => { onDelete(id); }; return ( {name || `(${t('empty')})`} {dist ?? t('none')} {({hasRole}) => ( , } )} disabled={hasRole} isHoverable >