diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-10-17 23:02:17 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-10-17 23:02:17 +0200 |
commit | cdf9842d6840652540331f6fc4d7dd4bae00c1cf (patch) | |
tree | 2e55c08f8c7ac0c4cfb2f5cc8faa52f0819d5e33 | |
parent | a1ae5c22957b45faa972d42474074fcc583d921f (diff) | |
download | gitbook-cdf9842d6840652540331f6fc4d7dd4bae00c1cf.zip gitbook-cdf9842d6840652540331f6fc4d7dd4bae00c1cf.tar.gz gitbook-cdf9842d6840652540331f6fc4d7dd4bae00c1cf.tar.bz2 |
Fix display of button in left toolbar
-rw-r--r-- | packages/gitbook-core/src/components/InjectedComponent.js | 9 | ||||
-rw-r--r-- | packages/gitbook-plugin-search/package.json | 2 | ||||
-rw-r--r-- | packages/gitbook-plugin-theme-default/src/components/Toolbar.js | 9 |
3 files changed, 11 insertions, 9 deletions
diff --git a/packages/gitbook-core/src/components/InjectedComponent.js b/packages/gitbook-core/src/components/InjectedComponent.js index 216d83f..097edaf 100644 --- a/packages/gitbook-core/src/components/InjectedComponent.js +++ b/packages/gitbook-core/src/components/InjectedComponent.js @@ -43,21 +43,22 @@ const Injection = React.createClass({ const InjectedComponentSet = React.createClass({ propTypes: { - components: React.PropTypes.oneOfType([ + components: React.PropTypes.oneOfType([ React.PropTypes.arrayOf(React.PropTypes.func), React.PropTypes.instanceOf(List) ]).isRequired, - props: React.PropTypes.object, - withContainer: React.PropTypes.bool + props: React.PropTypes.object, + children: React.PropTypes.node }, render() { - const { components, props, ...divProps } = this.props; + const { components, props, children, ...divProps } = this.props; const inner = components.map((Comp, i) => <Injection key={i} component={Comp} props={props} />); return ( <div {...divProps}> + {children} {inner} </div> ); diff --git a/packages/gitbook-plugin-search/package.json b/packages/gitbook-plugin-search/package.json index 1910832..db5e9ae 100644 --- a/packages/gitbook-plugin-search/package.json +++ b/packages/gitbook-plugin-search/package.json @@ -28,4 +28,4 @@ "bugs": { "url": "https://github.com/GitbookIO/gitbook/issues" } -} +}
\ No newline at end of file diff --git a/packages/gitbook-plugin-theme-default/src/components/Toolbar.js b/packages/gitbook-plugin-theme-default/src/components/Toolbar.js index 298017d..d426a40 100644 --- a/packages/gitbook-plugin-theme-default/src/components/Toolbar.js +++ b/packages/gitbook-plugin-theme-default/src/components/Toolbar.js @@ -21,10 +21,11 @@ const Toolbar = React.createClass({ return ( <GitBook.FlexLayout className="Toolbar"> <GitBook.FlexBox className="Toolbar-left"> - <GitBook.Button onClick={this.onToggle}> - <GitBook.Icon id="align-justify" /> - </GitBook.Button> - <GitBook.InjectedComponentSet align="flex-start" matching={{ role: 'toolbar:buttons:left' }} /> + <GitBook.InjectedComponentSet align="flex-end" matching={{ role: 'toolbar:buttons:left' }}> + <GitBook.Button onClick={this.onToggle}> + <GitBook.Icon id="align-justify" /> + </GitBook.Button> + </GitBook.InjectedComponentSet> </GitBook.FlexBox> <GitBook.FlexBox auto> <h1 className="Toolbar-Title"> |