changed from hexo to custom react stuff #1

Merged
developomp merged 73 commits from dev into master 2021-06-27 14:37:56 +09:00
Showing only changes of commit 0c05c9aaf6 - Show all commits

View file

@ -28,9 +28,7 @@ export default class Sidebar extends React.Component<
// for some reason this.setState only works if this is an arrow function // for some reason this.setState only works if this is an arrow function
toggleSidebar = () => { toggleSidebar = () => {
this.setState({ isSidebarOpen: !this.state.isSidebarOpen }) this.setState({ isSidebarOpen: !this.state.isSidebarOpen })
document.body.style.overflow = this.state.isSidebarOpen document.body.style.overflow = this.state.isSidebarOpen ? "" : "hidden"
? "scroll"
: "hidden"
} }
CommonSidebarToggleButtonStyle = css` CommonSidebarToggleButtonStyle = css`