1 |
- import React from'react';import Module from'../Module';class InputField extends Module{constructor(a){super(a)}render(){const a=this.props.name.charAt(0).toUpperCase()+this.props.name.substr(1);return React.createElement('div',{className:'form-group'},React.createElement('label',{htmlFor:this.props.name+'_id'},a),React.createElement('input',{className:'form-control',id:this.props.name+'_id',defaultValue:this.props.metadata.defaultValue,placeholder:'Enter '+this.props.name,required:this.props.metadata.required,onChange:a=>this.props.onChange(a.target.value)}),React.createElement('small',{id:this.props.name+'_Comment',className:'form-text text-muted'},this.props.metadata.comment))}}InputField.Category='Basic';export default InputField;
|