Skip to content

Instantly share code, notes, and snippets.

@gregturn
Created February 28, 2017 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregturn/c5daf4ecdb6c14721e34caa144940ee4 to your computer and use it in GitHub Desktop.
Save gregturn/c5daf4ecdb6c14721e34caa144940ee4 to your computer and use it in GitHub Desktop.
return (<li className='control-group'>
{this.props.settings.required.includes(this.props.name) && !this.props.settings[this.props.name] ?
<label className={labelLayout}>{this.props.label} <span className='required'>(*required)</span></label>
:
<label className={labelLayout}>{this.props.label}</label>
}
{optional}
<input className={inputLayout} type="text"
placeholder={this.props.placeHolder}
name={this.props.name}
onChange={this.props.handleChange}
value={this.props.settings[this.props.name]} />
</li>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment