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

import Input from '../../components/Input';

const propTypes = {
    formData: PropTypes.shape({
        inputs: PropTypes.arrayOf(PropTypes.shape({
            id: PropTypes.string,
            label: PropTypes.string,
            type: PropTypes.string,
            onChange: PropTypes.func,
            error: PropTypes.string
        })),
        onSubmit: PropTypes.func,
        isSubmitting: PropTypes.bool
    })
}

export default class LoginForm extends Component {

    constructor(props) {
        super(props);
    }

    render() {
        const inputs = this.props.formData.inputs;
        const isSubmitting = this.props.formData.isSubmitting;

        return (
            <div className="grid grid--justify-center">
                <div className="grid__col-3">
                    <h1>Login</h1>

                    <form className="form" onSubmit={this.props.formData.onSubmit}>

                        {
                            inputs.map((input, index) => {
                                return <Input key={index} {...input} disabled={isSubmitting}/>
                            })
                        }

                        <button type="submit" className="btn btn--primary margin-top--1" disabled={isSubmitting}><commit_msg>Set login fields to allow auto complete<commit_after>import React, { Component } from 'react';
import PropTypes from 'prop-types';

import Input from '../../components/Input';

const propTypes = {
    formData: PropTypes.shape({
        inputs: PropTypes.arrayOf(PropTypes.shape({
            id: PropTypes.string,
            label: PropTypes.string,
            type: PropTypes.string,
            onChange: PropTypes.func,
            error: PropTypes.string
        })),
        onSubmit: PropTypes.func,
        isSubmitting: PropTypes.bool
    })
}

export default class LoginForm extends Component {

    constructor(props) {
        super(props);
    }

    render() {
        const inputs = this.props.formData.inputs;
        const isSubmitting = this.props.formData.isSubmitting;

        return (
            <div className="grid grid--justify-center">
                <div className="grid__col-3">
                    <h1>Login</h1>

                    <form className="form" onSubmit={this.props.formData.onSubmit}>

                        {
                            inputs.map((input, index) => {
                                return <Input key={index} {...input} disabled={isSubmitting} allowAutoComplete={true}/>
                            })
                        }

                        <button type="submit" className="btn btn--primary margin-top--1" disabled={isSubmitting}>
{'fraction_non_alphanumeric': 0.1132007233273056, 'fraction_numerical': 0.0028933092224231465, 'mean_word_length': 1.680232558139535, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '3290597', 'n_tokens_mistral': 705, 'n_tokens_neox': 692, 'n_words': 148}