<commit_before>import React from 'react'
import styled from 'styled-components'

const Modal = props =>
  props.isOpen ? (
    <ModalContainer>
      <ModalContent>{props.children}</ModalContent>
    </ModalContainer>
  ) : (
    <div />
  )

const ModalContainer = styled.div`
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  padding: 50px;
`

const ModalContent = styled.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 600px;
  min-height: 200px;
  border-radius: 4px;
  background-color: ${props => props.theme.paletteTertiary};
  box-shadow: rgba(25, 17, 34, 0.05) 0px 3px 10px;
  padding: 5rem 2rem;
`<commit_msg>Add close icon to modal window<commit_after>import React from 'react'
import styled from 'styled-components'
import Close from 'react-icons/lib/md/close'

const Modal = props =>
  props.isOpen ? (
    <ModalContainer>
      <ModalContent>
        <CloseIcon onClick={() => props.handleClose()} />
        {props.children}
      </ModalContent>
    </ModalContainer>
  ) : (
    <div />
  )

const ModalContainer = styled.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  padding: 50px;
`

const ModalContent = styled.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 600px;
  min-height: 200px;
  border-radius: 4px;
  background-color: ${props => props.theme.paletteTertiary};
  box-shadow: rgba(25, 17, 34, 0.05) 0px 3px 10px;
  padding: 2rem 2rem 5rem 2rem;
`

const CloseIcon = styled(Close)`
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  color: ${props => props.theme.paletteFontPrimary};
  padding-left: 80%;
  margin: 0 0 4rem 0;
`
{'fraction_non_alphanumeric': 0.13988095238095238, 'fraction_numerical': 0.04365079365079365, 'mean_word_length': 3.403930131004367, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 20, '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': '6577467', 'n_tokens_mistral': 816, 'n_tokens_neox': 731, 'n_words': 191}