Files
swagger-ui/src/core/components/model-wrapper.jsx
Owen Conti 15e105c931 Merge branch 'master' of github.com:swagger-api/swagger-ui into bug/3102-unguarded-expressions
# Conflicts:
#	src/core/components/model.jsx
#	src/core/components/models.jsx
2017-07-03 16:12:31 -06:00

24 lines
596 B
JavaScript

import React, { Component, } from "react"
import PropTypes from "prop-types"
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>
}
}