LinkEditModal.jsx 1.1 KB

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