<commit_before>import React from 'react';


export default class InputWrap extends React.Component {
  render() {
    const { before, focused, isValid, name, icon } = this.props;
    let blockClassName = `auth0-lock-input-block auth0-lock-input-${name}`;
    if (!isValid) {
      blockClassName += " auth0-lock-error";
    }

    let wrapClassName = "auth0-lock-input-wrap";
    if (focused && isValid) {
      wrapClassName += " auth0-lock-focused";
    }

    // NOTE: Ugly hack until we upgrade to React 15 which has better
    // support for SVG.
    let iconElement = null;

    if (typeof icon === "string") {
      iconElement = <span dangerouslySetInnerHTML={{__html: icon}} />;
    } else if (icon) {
      iconElement = icon;
    }

    if (iconElement) {
      wrapClassName += " auth0-lock-input-wrap-with-icon";
    }

    return (
      <div className={blockClassName}>
        {before}
        <div className={wrapClassName}>
          {iconElement}
          {this.props.children}
        </div>
      </div>
    );
  }
}

InputWrap.propTypes = {
  before: React.PropTypes.element,
  children: React.PropTypes.oneOfType([
    React.PropTypes.element.isRequired,
    React.PropTypes.arrayOf(React.PropTypes.element).isRequired
  ]),
  focused: React.PropTypes.bool,
  isValid: React.PropTypes.bool.isRequired,
  name: React.PropTypes.string.isRequired,
  svg: React.PropTypes.string
};<commit_msg>Add after prop to InputWrap<commit_after>import React from 'react';


export default class InputWrap extends React.Component {
  render() {
    const { after, before, focused, isValid, name, icon } = this.props;
    let blockClassName = `auth0-lock-input-block auth0-lock-input-${name}`;
    if (!isValid) {
      blockClassName += " auth0-lock-error";
    }

    let wrapClassName = "auth0-lock-input-wrap";
    if (focused && isValid) {
      wrapClassName += " auth0-lock-focused";
    }

    // NOTE: Ugly hack until we upgrade to React 15 which has better
    // support for SVG.
    let iconElement = null;

    if (typeof icon === "string") {
      iconElement = <span dangerouslySetInnerHTML={{__html: icon}} />;
    } else if (icon) {
      iconElement = icon;
    }

    if (iconElement) {
      wrapClassName += " auth0-lock-input-wrap-with-icon";
    }

    return (
      <div className={blockClassName}>
        {before}
        <div className={wrapClassName}>
          {iconElement}
          {this.props.children}
        </div>
        {after}
      </div>
    );
  }
}

InputWrap.propTypes = {
  after: React.PropTypes.element,
  before: React.PropTypes.element,
  children: React.PropTypes.oneOfType([
    React.PropTypes.element.isRequired,
    React.PropTypes.arrayOf(React.PropTypes.element).isRequired
  ]),
  focused: React.PropTypes.bool,
  isValid: React.PropTypes.bool.isRequired,
  name: React.PropTypes.string.isRequired,
  svg: React.PropTypes.string
};
{'fraction_non_alphanumeric': 0.13151536071798411, 'fraction_numerical': 0.005522954780807732, 'mean_word_length': 2.7783572359843545, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3922219', 'n_tokens_mistral': 916, 'n_tokens_neox': 903, 'n_words': 196}