UNPKG

rstarter-supporthq

Version:

19 lines (18 loc) 710 B
import React from 'react'; const TextBox=(props)=>{ return <div> <label>{props.Label}</label> <input className={"form-control "+props.className} readOnly={props.readOnly} placeholder={props.placeHolder} disabled={props.disabled} value={props.Value} placeholder={props.placeHolder} onChange={props.onChange} onBlur={(e)=>{ if (props.isRequired){ let length=e.target.value.length; if (length>0){ e.target.style.background=""; }else{ e.target.style.background="rgba(255, 40, 40,.2)"; } } } }/> </div> } export default TextBox;