import * as React from 'react' import { Field, WrappedFieldProps } from 'redux-form' export interface OwnProps { name: string, type?: string, label?: string, help?: string, } interface P extends OwnProps, WrappedFieldProps {} class BootstrapField extends React.PureComponent { renderInput() { // cherry-pick or unload the garbage trunk, as you like const props = { // you can add onFocus or what else onChange: this.props.input.handleChange, value: this.props.input.value, id: this.props.name, // for labels, yo type: this.props.type, } // you'll need a bit more to handle checkboxes and radios // that's a story for another time return props.type === 'textarea' ?