<commit_before>'use strict';

import React from 'react';

require('styles//Iframe.scss');

class IframeComponent extends React.Component {
  getStyle(direction) {
    const type = this.props.transitionType
    const duration = this.props.transitionDuration
    return {
      animation: `${type}-${direction} ${duration}s linear forwards`
    }
  }

  render() {
    if (this.props.urlOut === this.props.urlIn) {
      return (
        <div className='iframe-component'>
          <iframe
            key={this.props.urlIn}
            src={this.props.urlIn}
          />
        </div>
      );
    } else {
      return (
        <div className='iframe-component'>
          <iframe
            key={this.props.urlOut}
            style={this.getStyle('out')}
            src={this.props.urlOut}
          />
          <iframe
            key={this.props.urlIn}
            style={this.getStyle('in')}
            src={this.props.urlIn}
          />
        </div>
      );
    }
  }
}

IframeComponent.displayName = 'IframeComponent';

IframeComponent.propTypes = {
  urlOut: React.PropTypes.string.isRequired,
  urlIn: React.PropTypes.string.isRequired,
  transitionType: React.PropTypes.string,
  transitionDuration: React.PropTypes.number
};

IframeComponent.defaultProps = {
  transitionType: 'crossfade',
  transitionDuration: 2
}

export default IframeComponent;<commit_msg>Switches to move type transition / Adjusts the transition duration default<commit_after>'use strict';

import React from 'react';

require('styles//Iframe.scss');

class IframeComponent extends React.Component {
  getStyle(direction) {
    const type = this.props.transitionType
    const duration = this.props.transitionDuration
    return {
      animation: `${type}-${direction} ${duration}s linear forwards`
    }
  }

  render() {
    if (this.props.urlOut === this.props.urlIn) {
      return (
        <div className='iframe-component'>
          <iframe
            key={this.props.urlIn}
            src={this.props.urlIn}
          />
        </div>
      );
    } else {
      return (
        <div className='iframe-component'>
          <iframe
            key={this.props.urlOut}
            style={this.getStyle('out')}
            src={this.props.urlOut}
          />
          <iframe
            key={this.props.urlIn}
            style={this.getStyle('in')}
            src={this.props.urlIn}
          />
        </div>
      );
    }
  }
}

IframeComponent.displayName = 'IframeComponent';

IframeComponent.propTypes = {
  urlOut: React.PropTypes.string.isRequired,
  urlIn: React.PropTypes.string.isRequired,
  transitionType: React.PropTypes.string,
  transitionDuration: React.PropTypes.number
};

IframeComponent.defaultProps = {
  transitionType: 'move',
  transitionDuration:.375
}

export default IframeComponent;
{'fraction_non_alphanumeric': 0.12677053824362605, 'fraction_numerical': 0.00141643059490085, 'mean_word_length': 2.3471563981042656, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '5543761', 'n_tokens_mistral': 842, 'n_tokens_neox': 822, 'n_words': 141}