Skip to content

Commit

Permalink
Fix layout thrashing
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown committed Dec 30, 2017
1 parent 91cdbe8 commit 7c866f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"react-helmet": "^5.2.0",
"react-icons": "^2.2.7",
"react-live": "^1.7.1",
"react-sidebar": "^2.3.2",
"react-sidebar": "2.3.2",
"rebass-emotion": "^1.0.5",
"remark-frontmatter": "^1.1.0",
"remark-parse": "^4.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/site/src/components/DocSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if (typeof window !== 'undefined') {
mql = window.matchMedia(`(min-width: 900px)`)
}

Sidebar.prototype.saveSidebarWidth = () => {}

type State = {
docked: boolean,
open: boolean
Expand Down
1 change: 1 addition & 0 deletions packages/site/src/components/DocWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default (props: Props) => {
return (
<Box flex={1}>
<DocSidebar
defaultSidebarWidth={290}
renderOutside={({ docked, setSidebarOpenState }) =>
!docked && (
<ToggleSidebarButton onClick={() => setSidebarOpenState(true)}>
Expand Down

0 comments on commit 7c866f7

Please sign in to comment.