mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
23 lines
No EOL
703 B
JavaScript
23 lines
No EOL
703 B
JavaScript
import React, { PropTypes, Component } from 'react';
|
|
import FormComponent from "./FormComponent.jsx";
|
|
|
|
class FormGroup extends Component {
|
|
render() {
|
|
return (
|
|
<div className="form-section">
|
|
{this.props.name === "default" ? null : <h3 className="form-section-heading">{this.props.label}</h3>}
|
|
{this.props.fields.map(field => <FormComponent key={field.name} {...field} updateCurrentValue={this.props.updateCurrentValue} />)}
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
|
|
FormGroup.propTypes = {
|
|
name: React.PropTypes.string,
|
|
label: React.PropTypes.string,
|
|
order: React.PropTypes.number,
|
|
fields: React.PropTypes.array,
|
|
updateCurrentValue: React.PropTypes.func
|
|
}
|
|
|
|
export default FormGroup; |