diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-09-22 10:54:54 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-09-22 10:54:54 +0200 |
commit | 45c54d0cd72509a65c42aaa95194ac1c9cda64c8 (patch) | |
tree | 08802e4b6d1eacdf8a371f7d3cef103662a67fb3 /packages/gitbook-plugin-theme-default/src/index.js | |
parent | f49089a7d3a6fd5523c71e06e5e0d132bb6ffd9a (diff) | |
download | gitbook-45c54d0cd72509a65c42aaa95194ac1c9cda64c8.zip gitbook-45c54d0cd72509a65c42aaa95194ac1c9cda64c8.tar.gz gitbook-45c54d0cd72509a65c42aaa95194ac1c9cda64c8.tar.bz2 |
Base tree rendering for summary
Diffstat (limited to 'packages/gitbook-plugin-theme-default/src/index.js')
-rw-r--r-- | packages/gitbook-plugin-theme-default/src/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/gitbook-plugin-theme-default/src/index.js b/packages/gitbook-plugin-theme-default/src/index.js index 4b98a22..33ca405 100644 --- a/packages/gitbook-plugin-theme-default/src/index.js +++ b/packages/gitbook-plugin-theme-default/src/index.js @@ -8,11 +8,12 @@ const Toolbar = require('./Toolbar'); let ThemeBody = React.createClass({ propTypes: { page: GitBook.Shapes.Page, + summary: GitBook.Shapes.Summary, children: React.PropTypes.node }, render() { - const { page, children } = this.props; + const { page, summary, children } = this.props; return ( <div className="GitBook book"> @@ -22,7 +23,7 @@ let ThemeBody = React.createClass({ <GitBook.ImportCSS href="gitbook/gitbook-plugin-theme-default/theme.css" /> <Toolbar /> - <Sidebar /> + <Sidebar summary={summary} /> <Page page={page} /> {children} </div> @@ -30,8 +31,8 @@ let ThemeBody = React.createClass({ } }); -ThemeBody = GitBook.connect(ThemeBody, ({page}) => { - return { page }; +ThemeBody = GitBook.connect(ThemeBody, ({page, summary}) => { + return { page, summary }; }); module.exports = GitBook.createPlugin((dispatch, state) => { |