Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Created September 3, 2018 14:36
Show Gist options
  • Save agoiabel/25214eae8684a8f32891c0a975d93c99 to your computer and use it in GitHub Desktop.
Save agoiabel/25214eae8684a8f32891c0a975d93c99 to your computer and use it in GitHub Desktop.
import React from 'react';
const Password = props => {
let formControl = "form-control";
if (props.touched && !props.valid) {
formControl = 'form-control control-error';
}
return (
<div className="form-group">
<input type="password" className={formControl} {...props} />
</div>
);
}
export default Password;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment