import clsx from 'clsx'; import React from 'react'; import AttachmentThumbs from 'soapbox/components/attachment-thumbs'; import Markup from 'soapbox/components/markup'; import { Stack } from 'soapbox/components/ui'; import AccountContainer from 'soapbox/containers/account-container'; import { isRtl } from 'soapbox/rtl'; import type { Status } from 'soapbox/types/entities'; interface IReplyIndicator { className?: string status?: Status onCancel?: () => void hideActions: boolean } const ReplyIndicator: React.FC = ({ className, status, hideActions, onCancel }) => { const handleClick = () => { onCancel!(); }; if (!status) { return null; } let actions = {}; if (!hideActions && onCancel) { actions = { onActionClick: handleClick, actionIcon: require('@tabler/icons/x.svg'), actionAlignment: 'top', actionTitle: 'Dismiss', }; } return ( {status.media_attachments.size > 0 && ( )} ); }; export default ReplyIndicator;