<commit_before>import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import FontAwesome from 'react-fontawesome';

import './CreateCardItem.css';

class CreateCardItem extends Component {

	handleEnterKey = (event) => {

		if (event.keyCode === 13) {
			event.preventDefault();
			this.props.handleSubmit();
		}
	}

	focusOnForm(isFocusOnForm) {

		const { cardActions } = this.props;
    
    if (isFocusOnForm) {
      cardActions.focusOnCardItemForm();
    } else {
      cardActions.blurOnCardItemForm();
    }
  }

  render() {
    return (
			<div 
				className="Create-Card-Item-Form"
				tabIndex="0" 
				onFocus={() => { this.focusOnForm(true) }}
				onBlur={() => { this.focusOnForm(false) }} 
			>
				<form onSubmit={ this.props.handleSubmit }>
					<Field
						className="Create-Card-Item-Form-Card-Title"
						autoFocus={true}
						type="text" 
						name="name"
						value=""
						component="textarea"
						dir="auto"
						onKeyDown={ this.handleEnterKey }
					/>
					<div className="Create-Card-Item-Form-Footer">
						<button type="submit" className="Create-Card-Item-Form-SubmitButton">Save</button>
						<FontAwesome 
							name="times"
							size="2x"
							className="Create-Card-Item-Form-Header-Close-Button"
							onClick={ () => this.props.cardActions.closeCreateCardItemForm() }
						/>
					</div>
				</form>
      </div>
    );
  }
}

export default  reduxForm({ form: 'createCardItemForm' })(CreateCardItem);<commit_msg>Add PropTypes to CreateCardItem component<commit_after>import React, { Component, PropTypes } from 'react';
import { Field, reduxForm } from 'redux-form';
import FontAwesome from 'react-fontawesome';

import './CreateCardItem.css';

const propTypes = {
  isCreateCardItemFormOpen: PropTypes.bool.isRequired,

  cardActions: PropTypes.object.isRequired
}

class CreateCardItem extends Component {

	handleEnterKey = (event) => {

		if (event.keyCode === 13) {
			event.preventDefault();
			this.props.handleSubmit();
		}
	}

	focusOnForm(isFocusOnForm) {

		const { cardActions } = this.props;
    
    if (isFocusOnForm) {
      cardActions.focusOnCardItemForm();
    } else {
      cardActions.blurOnCardItemForm();
    }
  }

  render() {
    return (
			<div 
				className="Create-Card-Item-Form"
				tabIndex="0" 
				onFocus={() => { this.focusOnForm(true) }}
				onBlur={() => { this.focusOnForm(false) }} 
			>
				<form onSubmit={ this.props.handleSubmit }>
					<Field
						className="Create-Card-Item-Form-Card-Title"
						autoFocus={true}
						type="text" 
						name="name"
						value=""
						component="textarea"
						dir="auto"
						onKeyDown={ this.handleEnterKey }
					/>
					<div className="Create-Card-Item-Form-Footer">
						<button type="submit" className="Create-Card-Item-Form-SubmitButton">Save</button>
						<FontAwesome 
							name="times"
							size="2x"
							className="Create-Card-Item-Form-Header-Close-Button"
							onClick={ () => this.props.cardActions.closeCreateCardItemForm() }
						/>
					</div>
				</form>
      </div>
    );
  }
}

CreateCardItem.propTypes = propTypes;

export default  reduxForm({ form: 'createCardItemForm' })(CreateCardItem);
{'fraction_non_alphanumeric': 0.14784778540237056, 'fraction_numerical': 0.002495321272613849, 'mean_word_length': 2.9888059701492535, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 31, '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': '3408036', 'n_tokens_mistral': 1300, 'n_tokens_neox': 1038, 'n_words': 168}