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 }) } const customStyles = { overlay: { cursor: 'pointer', overflowY: 'auto' }, content: { top: 'auto', left: '20%', right: '0', bottom: 'auto', width: '40%', margin: '50px auto', padding: '40px' } } return (
setForm({ isOpen: false })} parentSelector={() => document.body} style={customStyles} >

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