mirror of
https://github.com/gosticks/react-table.git
synced 2025-10-16 11:55:36 +00:00
22 lines
422 B
JavaScript
22 lines
422 B
JavaScript
import React from 'react'
|
|
import '../utils/prism'
|
|
|
|
export default React.createClass({
|
|
render () {
|
|
const { language, children } = this.props
|
|
return (
|
|
<pre>
|
|
<code className={'language-' + (language || 'jsx')}>
|
|
{children()}
|
|
</code>
|
|
</pre>
|
|
)
|
|
},
|
|
componentDidMount () {
|
|
window.Prism.highlightAll()
|
|
},
|
|
componentDidUpdate () {
|
|
window.Prism.highlightAll()
|
|
}
|
|
})
|