Created
September 3, 2018 14:28
-
-
Save agoiabel/6410a5151add3c8558154a9e49333b07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const TextArea = props => { | |
let formControl = "form-control"; | |
if (props.touched && !props.valid) { | |
formControl = 'form-control control-error'; | |
} | |
return ( | |
<div className="form-group"> | |
<textarea {...props} className={formControl} /> | |
</div> | |
); | |
} | |
export default TextArea; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment