<commit_before>import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import ModalPortal from './ModalPortal';
import * as ariaAppHider from '../helpers/ariaAppHider';
import SafeHTMLElement, {
  canUseDOM
} from '../helpers/safeHTMLElement';

export const portalClassName = 'ReactModalPortal';
export const bodyOpenClassName = 'ReactModal__Body--open';

const isReact16 = ReactDOM.createPortal !== undefined;
const createPortal = isReact16 ?
  ReactDOM.createPortal :
  ReactDOM.unstable_renderSubtreeIntoContainer;

function getParentElement(parentSelector) {
  return parentSelector();
}

export default class Modal extends Component {
  static setAppElement(element) {
    ariaAppHider.setElement(element);
  }

  /* eslint-disable no-console */
  static injectCSS() {
    (process.env.NODE_ENV !== "production")
      && console.warn(
        'React-Modal: injectCSS has been deprecated ' +
          'and no longer has any effect. It will be removed in a later version'
      );
  }
  /* eslint-enable no-console */

  /* eslint-disable react/no-unused-prop-types */
  static propTypes = {
    isOpen: PropTypes.bool.isRequired,
    style: PropTypes.shape({
      content: PropTypes.object,
      overlay: PropTypes.object
    }),
    portalClassName: PropTypes.string,<commit_msg>[chore] remove warning about injectCSS.<commit_after>import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import ModalPortal from './ModalPortal';
import * as ariaAppHider from '../helpers/ariaAppHider';
import SafeHTMLElement, {
  canUseDOM
} from '../helpers/safeHTMLElement';

export const portalClassName = 'ReactModalPortal';
export const bodyOpenClassName = 'ReactModal__Body--open';

const isReact16 = ReactDOM.createPortal !== undefined;
const createPortal = isReact16 ?
  ReactDOM.createPortal :
  ReactDOM.unstable_renderSubtreeIntoContainer;

function getParentElement(parentSelector) {
  return parentSelector();
}

export default class Modal extends Component {
  static setAppElement(element) {
    ariaAppHider.setElement(element);
  }

  /* eslint-disable react/no-unused-prop-types */
  static propTypes = {
    isOpen: PropTypes.bool.isRequired,
    style: PropTypes.shape({
      content: PropTypes.object,
      overlay: PropTypes.object
    }),
    portalClassName: PropTypes.string,
{'fraction_non_alphanumeric': 0.10718737017033651, 'fraction_numerical': 0.0033236393851267137, 'mean_word_length': 4.315673289183223, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6852296', 'n_tokens_mistral': 692, 'n_tokens_neox': 715, 'n_words': 173}