import React from "react"; import PropTypes from "prop-types"; import ModalStore from "../../stores/ModalStore"; import ToastStore from "../../stores/ToastStore"; import copyToClipboard, { copySupported } from "../../lib/copyToClipboard"; export default function Form(props) { const { alternative, caption, image, locale, locales } = props; const copyEmbedCode = (evt) => { evt.preventDefault(); copyToClipboard(`[image:${image.id}]`); ToastStore.dispatch({ type: "NOTICE", message: "Embed code copied to clipboard" }); }; const handleChangeLocale = (evt) => { props.setLocale(evt.target.value); }; return (
{copySupported() && ( )}
{locales && Object.keys(locales).length > 1 && (
)}
For visually impaired users and search engines.