changed from hexo to custom react stuff #1
1 changed files with 1 additions and 3 deletions
|
@ -28,9 +28,7 @@ export default class Sidebar extends React.Component<
|
|||
// for some reason this.setState only works if this is an arrow function
|
||||
toggleSidebar = () => {
|
||||
this.setState({ isSidebarOpen: !this.state.isSidebarOpen })
|
||||
document.body.style.overflow = this.state.isSidebarOpen
|
||||
? "scroll"
|
||||
: "hidden"
|
||||
document.body.style.overflow = this.state.isSidebarOpen ? "" : "hidden"
|
||||
}
|
||||
|
||||
CommonSidebarToggleButtonStyle = css`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue