opening a modal with the click of a button
问题 The next code uses a Modal react component: export class AddWorkLogEditor extends React.Component { constructor(props) { super(props); this.addWorkLog = this.addWorkLog.bind(this); this.onOpenModal = this.onOpenModal.bind(this); this.onCloseModal = this.onCloseModal.bind(this); this.state = { open:true }; } onOpenModal() { this.setState({open: this.props.openModal}); } onCloseModal() { this.setState({open:false}); } addWorkLog() { } render() { const bstyle = { backgroundColor: 'green',