Get modal with embedded form working

This commit is contained in:
John Lyon-Smith
2018-02-28 13:15:46 -08:00
parent 6f4330adc5
commit eb54ca0b62
6 changed files with 75 additions and 48 deletions

View File

@@ -9,15 +9,12 @@ class Modal extends Component {
children: PropTypes.node,
open: PropTypes.bool,
width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
// TODO: onCancel: PropTypes.func <- for handling ESC & enter key
}
static defaultProps = {
width: '60%',
}
// TODO: Capture ESC key https://stackoverflow.com/questions/3369593/how-to-detect-escape-key-press-with-pure-js-or-jquery
render() {
const { open, children, width } = this.props