<commit_before>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';

import Modal from '../modal';

import './styles.scss';

class ModalNewsletter extends PureComponent {
  render() {
    const { open, setModalNewsletterOpen } = this.props;

    return (
      <Modal
        isOpen={open}
        contentLabel="Contact Us"
        onRequestClose={() => {
          setModalNewsletterOpen(false);
        }}
      >
        {
          <div className="c-form-container">
            <h3>Updates and newsletters</h3>
            <p className="subtitle">Subscribe me to the GFW Newsletter!</p>
            <iframe
              title="newsletter"
              scrolling="no"
              src="http://connect.wri.org/l/120942/2016-02-08/2trw5q"
              width={280}
              height="900"
              type="text/html"
              frameBorder="0"
              style={{ border: 0 }}
            />
          </div>
        }
      </Modal>
    );
  }
}

ModalNewsletter.propTypes = {
  open: PropTypes.bool,
  setModalNewsletterOpen: PropTypes.func
};<commit_msg>Dynamic width to newsletter modal<commit_after>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import MediaQuery from 'react-responsive';
import { SCREEN_S } from 'utils/constants';

import Modal from '../modal';

import './styles.scss';

class ModalNewsletter extends PureComponent {
  render() {
    const { open, setModalNewsletterOpen } = this.props;

    return (
      <MediaQuery minWidth={SCREEN_S}>
        {isDesktop => (
          <Modal
            isOpen={open}
            contentLabel="Contact Us"
            onRequestClose={() => {
              setModalNewsletterOpen(false);
            }}
          >
            {
              <div className="c-form-container">
                <h3>Updates and newsletters</h3>
                <p className="subtitle">Subscribe me to the GFW Newsletter!</p>
                <iframe
                  title="newsletter"
                  scrolling="no"
                  src="http://connect.wri.org/l/120942/2016-02-08/2trw5q"
                  width={isDesktop ? 600 : 280}
                  height="900"
                  type="text/html"
                  frameBorder="0"
                  style={{ border: 0 }}
                />
              </div>
            }
          </Modal>
        )}
      </MediaQuery>
    );
  }
}

ModalNewsletter.propTypes = {
  open: PropTypes.bool,
  setModalNewsletterOpen: PropTypes.func
};
{'fraction_non_alphanumeric': 0.12217374057913527, 'fraction_numerical': 0.0218167393891313, 'mean_word_length': 1.6915688367129136, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 26, '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': '6717305', 'n_tokens_mistral': 755, 'n_tokens_neox': 705, 'n_words': 140}