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 (
); } Form.propTypes = { alternative: PropTypes.object, caption: PropTypes.object, image: PropTypes.object, locale: PropTypes.string, locales: PropTypes.array, setLocale: PropTypes.func, save: PropTypes.func, showCaption: PropTypes.bool, updateLocalization: PropTypes.func };