 import styles from './Level.css'
 
 Label = (props) ->
-    <div dangerouslySetInnerHTML={__html: props.material.content}>
+    <div dangerouslySetInnerHTML={{__html: props.material.content}}>
     </div>
 
 SubLevel = (props) ->


Material = (props) ->
    switch props.material.type
        when 'label' then `<Label {...props} />`
        when 'page' then `<MaterialLink {...props}/>`
        when 'pdf' then `<ExternalLink head="file-pdf-o" {...props}/>`
        when 'image' then `<ExternalLink head="picture-o" {...props}/>`

    </div>

MaterialLink = (props) ->
    <div className={props.className && styles[props.className]}>
        <Link to={"/material/" + props.material._id}>{props.material.title}</Link>
    </div>

