import React from 'react' import PropTypes from 'prop-types' import ReactModal from 'react-modal' import styles from './PeerForm.scss' const PeerForm = ({ form, setForm, connect }) => { const submit = () => { const { pubkey, host } = form connect({ pubkey, host }) } return (
setForm({ isOpen: false })} parentSelector={() => document.body} className={styles.modal} >

Connect to a peer

setForm({ pubkey: event.target.value })} id='pubkey' />
setForm({ host: event.target.value })} id='address' />
Submit
) } PeerForm.propTypes = { form: PropTypes.object.isRequired, setForm: PropTypes.func.isRequired, connect: PropTypes.func.isRequired } export default PeerForm