You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.9 KiB
51 lines
1.9 KiB
import React, { Component } from 'react'; |
|
import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap'; |
|
import './DialogConfirmation.css'; |
|
|
|
class DialogConfirmation extends Component { |
|
|
|
|
|
render() { |
|
return ( |
|
<Modal isOpen={this.props.visible} fade={false} toggle={this.props.toggle}> |
|
<ModalHeader toggle={this.props.toggle}>Delete Layer</ModalHeader> |
|
<ModalBody> |
|
Are you sure you want to delete this layer? |
|
</ModalBody> |
|
<ModalFooter> |
|
<Button color="primary" onClick={toggle}>Do Something</Button>{' '} |
|
<Button color="secondary" onClick={toggle}>Cancel</Button> |
|
</ModalFooter> |
|
</Modal> |
|
) |
|
} |
|
} |
|
|
|
/*const DialogConfirmation = (props) => { |
|
const { |
|
buttonLabel, |
|
className |
|
} = props; |
|
|
|
const [modal, setModal] = useState(false); |
|
|
|
const toggle = () => setModal(!modal); |
|
|
|
return ( |
|
<div> |
|
<Button color="danger" onClick={toggle}>{buttonLabel}</Button> |
|
<Modal isOpen={modal} fade={false} toggle={toggle} className={className}> |
|
<ModalHeader toggle={toggle}>Modal title</ModalHeader> |
|
<ModalBody> |
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
</ModalBody> |
|
<ModalFooter> |
|
<Button color="primary" onClick={toggle}>Do Something</Button>{' '} |
|
<Button color="secondary" onClick={toggle}>Cancel</Button> |
|
</ModalFooter> |
|
</Modal> |
|
</div> |
|
); |
|
}*/ |
|
|
|
export default DialogConfirmation; |