text: import React, { Component } from "react";
  import { Field } from "redux-form";
  import { TextField } from "material-ui";
  
  export default class FormFields extends Component {
  	renderTextField = ({
  		input,
  		label,
  		meta: { touched, error },
  		...custom
  	}) => (
  		<TextField
  			hintText={label}
  			floatingLabelText={label}
  			errorText={touched && error}
  			{...input}
  			{...custom}
  		/>
  	);
  
  	makeFields = ({ name, label }) => {
  		return (
  			<div key={name}>
  				<Field
  					name={name}
  					component={this.renderTextField}
  					label={label}
  				/>
  			</div>
  		);
  	};
  
  	render() {
  		return (
  			<div>{this.props.fields.map(field => this.makeFields(field))}</div>
  		);
  	}
  }
  