Created
June 3, 2018 14:33
-
-
Save jamestthompson3/87c6ba9100f5ae1c008bc3b0295356ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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