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