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,19 @@
import React from "react"
import ImPropTypes from "react-immutable-proptypes"
const EnumModel = ({ value, getComponent }) => {
let ModelCollapse = getComponent("ModelCollapse")
let collapsedContent = <span>Array [ { value.count() } ]</span>
return <span className="prop-enum">
Enum:<br />
<ModelCollapse collapsedContent={ collapsedContent }>
[ { value.join(", ") } ]
</ModelCollapse>
</span>
}
EnumModel.propTypes = {
value: ImPropTypes.iterable,
getComponent: ImPropTypes.func
}
export default EnumModel