summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-theme-default/src/components/Page.js
blob: cad376585b22471ee175abd46148e76882c0fda0 (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
const GitBook = require('gitbook-core');
const { React } = GitBook;

const Page = React.createClass({
    propTypes: {
        page: GitBook.Shapes.Page
    },

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

        return (
            <div className="Page page-wrapper">
                <GitBook.InjectedComponent matching={{ role: 'search:container:results' }} props={this.props}>
                    <GitBook.InjectedComponent matching={{ role: 'page:container' }} props={this.props}>
                        <GitBook.HTMLContent html={page.content} />
                    </GitBook.InjectedComponent>
                </GitBook.InjectedComponent>
            </div>
        );
    }
});

module.exports = Page;