Work on #3102. Moved all the components out of model.jsx into their own files so they can be grabbed via getComponent()

This commit is contained in:
Owen Conti
2017-06-28 22:07:07 -06:00
parent 10c35c4be3
commit d27cae0085
11 changed files with 308 additions and 269 deletions

View File

@@ -0,0 +1,22 @@
import React, { Component, PropTypes } from "react"
export default class ModelComponent extends Component {
static propTypes = {
schema: PropTypes.object.isRequired,
name: PropTypes.string,
getComponent: PropTypes.func.isRequired,
specSelectors: PropTypes.object.isRequired,
expandDepth: PropTypes.number
}
render(){
let { getComponent } = this.props
const Model = getComponent("Model")
return <div className="model-box">
<Model { ...this.props } depth={ 1 } expandDepth={ this.props.expandDepth || 0 }/>
</div>
}
}