<commit_before>import React from 'react';
import { Row, Col, FormGroup, FormControl, ControlLabel } from 'react-bootstrap';

/**
  *
  * For within RSVP form, plus guests
  *
  * @param {Object} rsvp
  *
  * @return {ReactComponent}
  */

export default (props) => {
  let plusSelect;
  let allowed = 0;
  const plusGuestOptions = [
      { value: 0, label: 'Select Plus' },
      { value: 1, label: 'Plus One' },
      { value: 2, label: 'Plus Two' },
      { value: 3, label: 'Plus Three' },
      { value: 4, label: 'Plus Four' },
      { value: 5, label: 'Plus Five' }
  ];

  if (props.rsvp.plus.allowed !== 0) {
    allowed = props.rsvp.plus.allowed;
  }

  const plusOptions = plusGuestOptions.map(function(option, i){
    if (option.value <= allowed) {
      return <option value={option.value} key={i}>{option.label}</option>;
    }
  });

  if (allowed !== 0) {
    plusSelect = (
      <FormGroup>
        <ControlLabel>+ guests?</ControlLabel>
        <FormControl componentClass="select" placeholder="select" onChange={props._changePlus} value={props.rsvp.plus.bringing}>
          {plusOptions}
        </FormControl>
      </FormGroup>);
  }

  return (
    <Row><Col xs={12}>{plusSelect}</Col></Row>
  );
};<commit_msg>RSVP - plus input alignment<commit_after>import React from 'react';
import { Row, Col, FormGroup, FormControl, ControlLabel } from 'react-bootstrap';

/**
  *
  * For within RSVP form, plus guests
  *
  * @param {Object} rsvp
  *
  * @return {ReactComponent}
  */

export default (props) => {
  let plusSelect;
  let allowed = 0;
  const plusGuestOptions = [
      { value: 0, label: 'Select Plus' },
      { value: 1, label: 'Plus One' },
      { value: 2, label: 'Plus Two' },
      { value: 3, label: 'Plus Three' },
      { value: 4, label: 'Plus Four' },
      { value: 5, label: 'Plus Five' }
  ];

  if (props.rsvp.plus.allowed !== 0) {
    allowed = props.rsvp.plus.allowed;
  }

  const plusOptions = plusGuestOptions.map(function(option, i){
    if (option.value <= allowed) {
      return <option value={option.value} key={i}>{option.label}</option>;
    }
  });

  if (allowed !== 0) {
    plusSelect = (
      <FormGroup>
        <ControlLabel>+ guests?</ControlLabel>
        <FormControl componentClass="select" placeholder="select" onChange={props._changePlus} value={props.rsvp.plus.bringing}>
          {plusOptions}
        </FormControl>
      </FormGroup>);
  }

  return (
    <Row><Col xs={6} xsOffset={3}>{plusSelect}</Col></Row>
  );
};
{'fraction_non_alphanumeric': 0.1674679487179487, 'fraction_numerical': 0.008814102564102564, 'mean_word_length': 2.907668231611894, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '2270019', 'n_tokens_mistral': 857, 'n_tokens_neox': 820, 'n_words': 198}