<commit_before>/* eslint react/prop-types: [2, {ignore: ["container", "containerPadding", "target", "placement", "children"] }] */
/* These properties are validated in 'Portal' and 'Position' components */

import React, { cloneElement } from 'react';
import BaseOverlay from 'react-overlays/lib/Overlay';
import CustomPropTypes from './utils/CustomPropTypes';
import Fade from './Fade';
import classNames from 'classnames';

class Overlay extends React.Component {

  render() {
    let {
        children: child
      , animation: transition
      , ...props } = this.props;

    if (transition === true) {
      transition = Fade;
    }

    if (!transition) {
      child = cloneElement(child, {
        className: classNames('in', child.props.className)
      });
    }

    return (
      <BaseOverlay
        {...props}
        transition={transition}<commit_msg>[fixed] when overlay animation is false the transition prop passed to base overlay should be null so that it does not trigger a React PropTypes warning<commit_after>/* eslint react/prop-types: [2, {ignore: ["container", "containerPadding", "target", "placement", "children"] }] */
/* These properties are validated in 'Portal' and 'Position' components */

import React, { cloneElement } from 'react';
import BaseOverlay from 'react-overlays/lib/Overlay';
import CustomPropTypes from './utils/CustomPropTypes';
import Fade from './Fade';
import classNames from 'classnames';

class Overlay extends React.Component {

  render() {
    let {
        children: child
      , animation: transition
      , ...props } = this.props;

    if (transition === true) {
      transition = Fade;
    }

    if (transition === false) {
      transition = null;
    }

    if (!transition) {
      child = cloneElement(child, {
        className: classNames('in', child.props.className)
      });
    }

    return (
      <BaseOverlay
        {...props}
        transition={transition}
{'fraction_non_alphanumeric': 0.131307929969104, 'fraction_numerical': 0.0010298661174047373, 'mean_word_length': 3.064853556485356, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3461033', 'n_tokens_mistral': 535, 'n_tokens_neox': 526, 'n_words': 165}