import styled from '@emotion/styled'; import {Button} from 'sentry/components/button'; import ButtonBar from 'sentry/components/buttonBar'; import Confirm from 'sentry/components/confirm'; import {IconDelete, IconDownload, IconShow} from 'sentry/icons'; import {t} from 'sentry/locale'; import {space} from 'sentry/styles/space'; type Props = { attachmentId: string; onDelete: (attachmentId: string) => void; url: string | null; hasPreview?: boolean; onPreview?: (attachmentId: string) => void; previewIsOpen?: boolean; withPreviewButton?: boolean; }; function EventAttachmentActions({ url, withPreviewButton, hasPreview, previewIsOpen, onPreview, onDelete, attachmentId, }: Props) { function handlePreview() { onPreview?.(attachmentId); } return ( onDelete(attachmentId)} disabled={!url} >