     comp = @props.component
 
     folder = if @state.foldOpen
-        React.DOM.span {className: 'component-folder open'}, "[ - ] "
+        span {className: 'component-folder open'}, "[ - ] "
       else
-        React.DOM.span {className: 'component-folder closed'}, "[ + ] "
+        span {className: 'component-folder closed'}, "[ + ] "
 
-    header = React.DOM.div {className: "component-header", onClick: @headerClicked},
+    header = div {className: "component-header", onClick: @headerClicked},
       folder
-      React.DOM.span {className: 'component-type'},
+      span {className: 'component-type'},
         comp.get('type')
       " "
-      React.DOM.span {className: 'component-cid'},
+      span {className: 'component-cid'},
         comp.get('cid')
 
     if @state.foldOpen


  render: ->
    folder = if @state.foldOpen
        React.DOM.span {className: 'entity-folder open'}, "[ - ] "
      else
        React.DOM.span {className: 'entity-folder closed'}, "[ + ] "

    nameLabel = "Entity #{@props.eid}"
    @props.components.forEach (comp,cid) =>
      if comp.get('type') == 'name'
        nameLabel = comp.get('name') + " (#{@props.eid})"

    header = React.DOM.div {className: "entity-header", onClick: @headerClicked},
      folder
      nameLabel


        React.createElement PropRow, {key: key, name: key, value: value}
      ).toList()

      props = table {className: 'component-props'},
        tbody null,
        rows

      div {className: 'component'},
        header,
        props

    else
      div {className: 'component'},
        header

PropRow = React.createClass
  displayName: 'PropRow'
  render: ->
    tr null,
      td {className:'prop-name'}, @props.name
      React.createElement PropValueCell, {value: @props.value}

PropValueCell = React.createClass
  displayName: 'PropValueCell'
  render: ->
    val = if @props.value? then @props.value.toString() else "?"
    td {className:'prop-value'}, val
    
module.exports = InspectorUI

