GridEditModal.jsx 997 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import React from 'react';
  2. import {
  3. Modal, ModalHeader, ModalBody, ModalFooter,
  4. } from 'reactstrap';
  5. export default class GridEditModal extends React.PureComponent {
  6. constructor(props) {
  7. super(props);
  8. this.state = {
  9. show: false,
  10. };
  11. }
  12. show() {
  13. this.setState({ show: true });
  14. }
  15. hide() {
  16. this.setState({ show: false });
  17. }
  18. cancel() {
  19. this.hide();
  20. }
  21. render() {
  22. return (
  23. <Modal isOpen={this.state.show} toggle={this.cancel}>
  24. <ModalHeader tag="h4" toggle={this.cancel} className="bg-primary text-light">
  25. Edit Grid
  26. </ModalHeader>
  27. <ModalBody>
  28. </ModalBody>
  29. <ModalFooter className="grw-modal-footer">
  30. <div className="ml-auto">
  31. <button type="button" className="mr-2 btn btn-secondary" onClick={this.cancel}>Cancel</button>
  32. <button type="button" className="btn btn-primary">Done</button>
  33. </div>
  34. </ModalFooter>
  35. </Modal>
  36. );
  37. }
  38. }