| 3 | import { Component, PropTypes } from 'react'; |
| 4 | |
| 5 | const Code = class extends Component { |
| 6 | constructor (props) { |
| 7 | super(props); |
| 8 | } |
| 9 | |
| 10 | componentDidMount () { |
| 11 | window.prettyPrint(null, this.code); |
| 12 | } |
| 13 | |
| 14 | render () { |
| 15 | return (<div className="code" ref={(c) => this.code = c}><pre className="prettyprint">{this.props.children}</pre></div>); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | Code.propTypes = { |
| 20 | children: PropTypes.any |
nothing calls this directly
no outgoing calls
no test coverage detected