import React from 'react'; import PropTypes from 'prop-types'; import Icon from './Icon'; export default function UploadButton(props) { let openfile = () => { const input = props.inputRef.current; if (props.value) { props.onChange(''); } else { input.click(); } }; let attachmentChanged = (event) => { props.onChange(event.target.value); }; return (