React.createElement(
class StatelessModalExample extends Component {
state = { isOpen: true };
openModal = () => {
this.setState({ isOpen: true })
}
closeModal = () => {
this.setState({ isOpen: false })
}
render() {
return (
<div>
<Button style={{backgroundColor: 'black'}} onClick={() => this.openModal()}>Open Modal</Button>
<StatelessModal isOpen={this.state.isOpen} onBackgroundClick={() => this.closeModal()}>
<Row>
<Col>
<h1>Modal Example</h1>
<p>Click the background or the close button to dismiss the modal.</p>
</Col>
</Row>
<CloseButton
absolute
aria-label="Close Callout"
onClick={() => this.closeModal()}>×</CloseButton
>
</StatelessModal>
</div>
)
}
}
)