UNPKG

@wgoo/cli

Version:

Wgoo Cli 是一个 React 组件库构建工具,通过 Wgoo Cli 可以快速搭建一套功能完备的 React 组件库。

33 lines (28 loc) 707 B
import React from 'react'; import './style.less'; class Section extends React.Component { get currentPage() { const { hash } = window.location; if (hash) { return hash.split('/').slice(-1)[0]; } return window.location.hash; } render() { const { hasSimulator, children } = this.props; return ( <div className={ hasSimulator ? 'wgoo-doc-container wgoo-doc-row wgoo-doc-container--with-simulator' : 'wgoo-doc-container wgoo-doc-row' } > <div className='page-content'> <div className='react-doc-page-content'>{children}</div> </div> </div> ); } } export default Section;