blob: 5ad890161aa770b91bf4287659ced0ea57a3b3a0 (
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
26
27
28
29
30
31
32
33
34
|
const GitBook = require('gitbook-core');
const { React } = GitBook;
/**
* Container for the page.
* @type {ReactClass}
*/
const Page = React.createClass({
propTypes: {
page: GitBook.PropTypes.Page
},
render() {
const { page } = this.props;
return (
<div className="PageContainer">
<GitBook.InjectedComponent matching={{ role: 'search:container:results' }} props={this.props}>
<div className="Page">
<GitBook.InjectedComponentSet matching={{ role: 'page:header' }} props={this.props} />
<GitBook.InjectedComponent matching={{ role: 'page:container' }} props={this.props}>
<GitBook.PageContent document={page.document} />
</GitBook.InjectedComponent>
<GitBook.InjectedComponentSet matching={{ role: 'page:footer' }} props={this.props} />
</div>
</GitBook.InjectedComponent>
</div>
);
}
});
module.exports = Page;
|