// tslint:disable:react-a11y-anchors import React from 'react'; import * as GoogleChrome from '../util/GoogleChrome'; import { AttachmentType } from '../types/Attachment'; type Props = { attachment: AttachmentType; url: string; caption?: string; onSave: (caption: string) => void; onClose: () => void; }; const CaptionEditorObject = (props: Props) => { const { url, onClose, attachment } = props; const { contentType } = attachment || { contentType: null }; const isImageTypeSupported = GoogleChrome.isImageTypeSupported(contentType); if (isImageTypeSupported) { return ( {window.i18n('imageAttachmentAlt')} ); } const isVideoTypeSupported = GoogleChrome.isVideoTypeSupported(contentType); if (isVideoTypeSupported) { return ( ); } return
; }; /** * This actually no longer allows to edit the caption as we do not support this feature anymore. * This is just a lightbox to preview the attachments before sending them in a message */ export const CaptionEditor = (props: Props) => { const { onClose } = props; return (
); };