{"size": 812, "ext": "js", "max_stars_repo_path": "src/client/components/StoryFooter/Confirmation.js", "max_stars_repo_name": "lucykolosova/waivio", "max_stars_repo_stars_event_min_datetime": "2018-11-05T08:00:46.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-10T11:10:22.000Z", "max_issues_repo_path": "src/client/components/StoryFooter/Confirmation.js", "max_issues_repo_name": "lucykolosova/waivio", "max_issues_repo_issues_event_min_datetime": "2018-11-20T16:13:50.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T12:50:23.000Z", "max_forks_repo_path": "src/client/components/StoryFooter/Confirmation.js", "max_forks_repo_name": "lucykolosova/waivio", "max_forks_repo_forks_event_min_datetime": "2019-08-09T10:40:22.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-03T12:09:06.000Z"}
{"max_stars_count": 8, "max_issues_count": 1632, "max_forks_count": 8, "avg_line_length": 25.375, "max_line_length": 62, "alphanum_fraction": 0.6625615764}
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import './Confirmation.less';

const Confirmation = ({ onConfirm, onCancel, type }) => (
  <div className="Confirmation">
    <a role="presentation" onClick={onConfirm}>
      <i className="iconfont icon-success" />
      <FormattedMessage id={type} defaultMessage={type} />
    </a>
    <a role="presentation" onClick={onCancel}>
      <i className="iconfont icon-delete" />
      <FormattedMessage id="cancel" defaultMessage="Cancel" />
    </a>
  </div>
);

Confirmation.propTypes = {
  onConfirm: PropTypes.func,
  onCancel: PropTypes.func,
  type: PropTypes.string,
};

Confirmation.defaultProps = {
  onConfirm: () => {},
  onCancel: () => {},
  type: 'confirm',
};

export default Confirmation;
