<commit_before>const PropTypes = require('prop-types');
const React = require('react');

import { withTheme } from './Theme';
const Button = require('./Button');
const Icon = require('./Icon');
const MXFocusTrap = require('../components/MXFocusTrap');

const _merge = require('lodash/merge');

const { themeShape } = require('../constants/App');

const StyleUtils = require('../utils/Style');
const { deprecatePrimaryColor, deprecatePropWithMessage } = require('../utils/Deprecation');

class Modal extends React.Component {
  static propTypes = {
    'aria-describedby': PropTypes.string,
    'aria-label': PropTypes.string,
    'aria-labelledby': PropTypes.string,
    buttons: PropTypes.arrayOf(PropTypes.shape({
      actionText: PropTypes.string,
      className: PropTypes.string,
      isActive: PropTypes.bool,
      icon: PropTypes.string,
      label: PropTypes.string,
      onClick: PropTypes.func,
      primaryColor: PropTypes.string,
      style: PropTypes.object,
      type: PropTypes.oneOf(['primary', 'secondary'])
    })),
    color: PropTypes.string,
    contentStyle: PropTypes.object,
    focusOnLoad: PropTypes.bool,
    focusTrapProps: PropTypes.object,
    footerContent: PropTypes.node,
    footerStyle: PropTypes.object,
    isRelative: PropTypes.bool,
    onRequestClose: PropTypes.func,
    role: PropTypes.string,
    showCloseIcon: PropTypes.bool,
    showFooter: PropTypes.bool,
    showScrim: PropTypes.bool,
    showTitleBar: PropTypes.bool,
    style: PropTypes.object,
    styles: PropTypes.object,
    theme: themeShape,
    title: PropTypes.string,
    tooltip: PropTypes.string,
    tooltipLabel: PropTypes.string,
    tooltipTitle: PropTypes.string
  };

  static defaultProps = {
    buttons: [],
    focusOnLoad: true,
    focusTrapProps: {},
    isRelative: false,
    role: 'dialog',
    showCloseIcon: true,
    showFooter: false,
    showScrim: true,
    showTitleBar: false,
    title: '',
    tooltip: null,
    tooltipLabel: '',
    tooltipTitle: null
  };
<commit_msg>Adds prop type for portalTo prop<commit_after>const PropTypes = require('prop-types');
const React = require('react');

import { withTheme } from './Theme';
const Button = require('./Button');
const Icon = require('./Icon');
const MXFocusTrap = require('../components/MXFocusTrap');

const _merge = require('lodash/merge');

const { themeShape } = require('../constants/App');

const StyleUtils = require('../utils/Style');
const { deprecatePrimaryColor, deprecatePropWithMessage } = require('../utils/Deprecation');

class Modal extends React.Component {
  static propTypes = {
    'aria-describedby': PropTypes.string,
    'aria-label': PropTypes.string,
    'aria-labelledby': PropTypes.string,
    buttons: PropTypes.arrayOf(PropTypes.shape({
      actionText: PropTypes.string,
      className: PropTypes.string,
      isActive: PropTypes.bool,
      icon: PropTypes.string,
      label: PropTypes.string,
      onClick: PropTypes.func,
      primaryColor: PropTypes.string,
      style: PropTypes.object,
      type: PropTypes.oneOf(['primary', 'secondary'])
    })),
    color: PropTypes.string,
    contentStyle: PropTypes.object,
    focusOnLoad: PropTypes.bool,
    focusTrapProps: PropTypes.object,
    footerContent: PropTypes.node,
    footerStyle: PropTypes.object,
    isRelative: PropTypes.bool,
    onRequestClose: PropTypes.func,
    portalTo: PropTypes.string,
    role: PropTypes.string,
    showCloseIcon: PropTypes.bool,
    showFooter: PropTypes.bool,
    showScrim: PropTypes.bool,
    showTitleBar: PropTypes.bool,
    style: PropTypes.object,
    styles: PropTypes.object,
    theme: themeShape,
    title: PropTypes.string,
    tooltip: PropTypes.string,
    tooltipLabel: PropTypes.string,
    tooltipTitle: PropTypes.string
  };

  static defaultProps = {
    buttons: [],
    focusOnLoad: true,
    focusTrapProps: {},
    isRelative: false,
    role: 'dialog',
    showCloseIcon: true,
    showFooter: false,
    showScrim: true,
    showTitleBar: false,
    title: '',
    tooltip: null,
    tooltipLabel: '',
    tooltipTitle: null
  };

{'fraction_non_alphanumeric': 0.12643678160919541, 'fraction_numerical': 0.0, 'mean_word_length': 3.6110484780157837, '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': '3914402', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1224, 'n_words': 265}