import React, { PropTypes } from 'react'; import radium from 'radium'; import componentStyles from './styles'; import InputField from '../InputField'; class InputFieldWithIcon extends InputField { static propTypes = { autofocus: PropTypes.bool, defaultValue: PropTypes.string, error: PropTypes.string, iconName: PropTypes.string, name: PropTypes.string, onChange: PropTypes.func, placeholder: PropTypes.string, style: PropTypes.object, type: PropTypes.string, }; renderHeading = () => { const { error, placeholder } = this.props; const { value } = this.state; const { errorStyles, placeholderStyles } = componentStyles; if (error) { return