summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-theme-default/src/components/Body.js
blob: 2eba09a2df9915f75279d463f06fcb4bbca4c1f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const GitBook = require('gitbook-core');
const { React } = GitBook;

const Page = require('./Page');
const Toolbar = require('./Toolbar');

const Body = React.createClass({
    propTypes: {
        page:   GitBook.PropTypes.Page,
        readme: GitBook.PropTypes.Readme
    },

    render() {
        const { page, readme } = this.props;

        return (
            <div className="Body page-wrapper">
                <Toolbar title={page.title} readme={readme} />
                <Page page={page} />
            </div>
        );
    }
});

module.exports = Body;