<commit_before>import React, { Component, PropTypes } from 'react';
import styles from '../../../build/styles';
import { getCallbacks } from '../../helper/helper';

export default class Modal extends Component {
  static propTypes = {
    style: PropTypes.object,
    children: PropTypes.any,
    className: PropTypes.string,
    isActive: PropTypes.bool.isRequired,
    onCloseRequest: PropTypes.func,
    showOverlayCloseButton: PropTypes.bool,
    headerContent: PropTypes.node,
    footerContent: PropTypes.node,
    type: PropTypes.oneOf(['card', 'image']),
  };

  static defaultProps = {
    style: {},
    className: '',
    onCloseRequest: () => null,
  };

  createModalClassName() {
    return [
      styles.modal,
      this.props.isActive ? styles.isActive : '',
      this.props.className,
    ].join(' ').trim();
  }

  renderContent() {
    if (this.props.type === 'image') {
      return (
        <div className={styles.modalContent} {...getCallbacks(this.props)}>
          {this.props.children}
        </div>
      );
    }

    if (this.props.type === 'card') {
      return (
        <div className={[styles.modalCard, '__re-bulma_modal_card'].join(' ')}>
          <header className={styles.modalCardHead}>
            <p className={styles.modalCardTitle}>{this.props.headerContent}</p>
            <button className={styles.delete} onClick={this.props.onCloseRequest} />
          </header>
          <section className={styles.modalCardBody}>
            {this.props.children}
          </section>
          {
            this.props.footerContent ? (
              <footer className={styles.modalCardFoot}>
                {this.props.footerContent}
              </footer>
            )
            : null
          }
        </div>

      );
    }

    return (
      <div className={styles.modalContainer}>
        <div className={styles.modalContent} {...getCallbacks(this.props)}>
          {this.props.children}<commit_msg>Change title element to div<commit_after>import React, { Component, PropTypes } from 'react';
import styles from '../../../build/styles';
import { getCallbacks } from '../../helper/helper';

export default class Modal extends Component {
  static propTypes = {
    style: PropTypes.object,
    children: PropTypes.any,
    className: PropTypes.string,
    isActive: PropTypes.bool.isRequired,
    onCloseRequest: PropTypes.func,
    showOverlayCloseButton: PropTypes.bool,
    headerContent: PropTypes.node,
    footerContent: PropTypes.node,
    type: PropTypes.oneOf(['card', 'image']),
  };

  static defaultProps = {
    style: {},
    className: '',
    onCloseRequest: () => null,
  };

  createModalClassName() {
    return [
      styles.modal,
      this.props.isActive ? styles.isActive : '',
      this.props.className,
    ].join(' ').trim();
  }

  renderContent() {
    if (this.props.type === 'image') {
      return (
        <div className={styles.modalContent} {...getCallbacks(this.props)}>
          {this.props.children}
        </div>
      );
    }

    if (this.props.type === 'card') {
      return (
        <div className={[styles.modalCard, '__re-bulma_modal_card'].join(' ')}>
          <header className={styles.modalCardHead}>
            <div className={styles.modalCardTitle}>{this.props.headerContent}</div>
            <button className={styles.delete} onClick={this.props.onCloseRequest} />
          </header>
          <section className={styles.modalCardBody}>
            {this.props.children}
          </section>
          {
            this.props.footerContent ? (
              <footer className={styles.modalCardFoot}>
                {this.props.footerContent}
              </footer>
            )
            : null
          }
        </div>

      );
    }

    return (
      <div className={styles.modalContainer}>
        <div className={styles.modalContent} {...getCallbacks(this.props)}>
          {this.props.children}
{'fraction_non_alphanumeric': 0.1465648854961832, 'fraction_numerical': 0.0, 'mean_word_length': 2.273105745212323, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3804001', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1109, 'n_words': 199}