import React from 'react'; import { Link } from 'react-router'; import { Collapse } from '../../../'; import * as utils from '../utils'; import hljs from 'highlight.js'; export default class Demo extends React.Component { constructor(props) { super(props); this.state = { activeKey: '', }; } handleChange(activeKey) { this.setState({ activeKey: this.state.activeKey === activeKey ? '' : activeKey }); } render() { const { id, meta, intro, code, preview, style, src, expand, pathname } = this.props; const introChildren = intro.map(utils.objectToComponent.bind(null, pathname)); const highlightedCode = hljs.highlight('javascript', code).value; return (
{ meta.iframe === 'true' ?