{"size": 887, "ext": "js", "max_stars_repo_path": "frontend/src/routes/components/feedback/Modal/Basic.js", "max_stars_repo_name": "dubis78/academiageek-app-admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "frontend/src/routes/components/feedback/Modal/Basic.js", "max_issues_repo_name": "dubis78/academiageek-app-admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "frontend/src/routes/components/feedback/Modal/Basic.js", "max_forks_repo_name": "dubis78/academiageek-app-admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.1590909091, "max_line_length": 69, "alphanum_fraction": 0.519729425}
import React from "react";
import {Button, Card, Modal} from "antd";

class Basic extends React.Component {
  state = {visible: false};
  showModal = () => {
    this.setState({
      visible: true,
    });
  };
  handleOk = (e) => {
    console.log(e);
    this.setState({
      visible: false,
    });
  };
  handleCancel = (e) => {
    console.log(e);
    this.setState({
      visible: false,
    });
  };

  render() {
    return (
      <Card title="Basic" className="gx-card">
        <Button type="primary" onClick={this.showModal}>Open</Button>
        <Modal
          title="Basic Modal"
          visible={this.state.visible}
          onOk={this.handleOk}
          onCancel={this.handleCancel}
        >
          <p>Some contents...</p>
          <p>Some contents...</p>
          <p>Some contents...</p>
        </Modal>
      </Card>
    );
  }
}

export default Basic;
