Skip to content

Instantly share code, notes, and snippets.

@jamestthompson3
Created June 3, 2018 14:33
Show Gist options
  • Save jamestthompson3/87c6ba9100f5ae1c008bc3b0295356ea to your computer and use it in GitHub Desktop.
Save jamestthompson3/87c6ba9100f5ae1c008bc3b0295356ea to your computer and use it in GitHub Desktop.
export const AddPopup = ({ open, onChange, handleSubmit, text, closeModal }) => (
<Popup
open={open}
onSubmit={e => {
e.preventDefault()
handleSubmit().then(() => closeModal())
}}
>
<StyledInput autoFocus value={text} onChange={onChange} />
<Button style={{ float: 'right' }} type="submit">
Submit
</Button>
</Popup>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment