<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';

import Cross from '../images/x.svg';

import styles from './Modal.module.css';
import { compose, withHandlers } from 'recompose';

const Modal = ({ children, isOpen, hasClose, close, size, onClickOutside }) => (
  <div
    className={cn(styles.modal, {
      [styles.isOpen]: isOpen,
    })}
    onClick={onClickOutside}
  >
    <div className={styles.inner}>
      <div className={cn(styles.container, styles[size])}>
        {hasClose ? (
          <div className={styles.close}>
            {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}
            <img
              src={Cross}
              className={styles.close__icon}
              onClick={close}
              alt="close"
            />
          </div>
        ) : null}
        <div className={styles.content} onClick={e => e.stopPropagation()}>
          {children}<commit_msg>Fix: stop-propagation on click close button (#686)<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';

import Cross from '../images/x.svg';

import styles from './Modal.module.css';
import { compose, withHandlers } from 'recompose';

const Modal = ({ children, isOpen, hasClose, close, size, onClickOutside }) => (
  <div
    className={cn(styles.modal, {
      [styles.isOpen]: isOpen,
    })}
    onClick={onClickOutside}
  >
    <div className={styles.inner}>
      <div className={cn(styles.container, styles[size])}>
        {hasClose ? (
          <div className={styles.close}>
            {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}
            <img
              src={Cross}
              className={styles.close__icon}
              onClick={e => e.stopPropagation() || close()}
              alt="close"
            />
          </div>
        ) : null}
        <div className={styles.content} onClick={e => e.stopPropagation()}>
          {children}
{'fraction_non_alphanumeric': 0.1482572410407462, 'fraction_numerical': 0.003436426116838488, 'mean_word_length': 2.460101867572156, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 22, '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': '7635173', 'n_tokens_mistral': 599, 'n_tokens_neox': 595, 'n_words': 127}