fix sidebar classnames

This commit is contained in:
SrGooglo 2023-01-13 19:08:12 +00:00
parent f2f3988da6
commit 9ec7fcb40e

View File

@ -280,8 +280,7 @@ export default class Sidebar extends React.Component {
render() { render() {
if (!this.state.menus) return null if (!this.state.menus) return null
return ( return <div
<div
onMouseEnter={this.onMouseEnter} onMouseEnter={this.onMouseEnter}
onMouseLeave={this.handleMouseLeave} onMouseLeave={this.handleMouseLeave}
className={ className={
@ -290,8 +289,8 @@ export default class Sidebar extends React.Component {
{ {
["customRender"]: this.state.customRender, ["customRender"]: this.state.customRender,
["floating"]: window.app?.settings.get("sidebar.floating"), ["floating"]: window.app?.settings.get("sidebar.floating"),
["collapsed"]: !this.state.customRender && this.state.visible && this.state.collapsed, ["elevated"]: this.state.visible && this.state.elevated,
["elevated"]: !this.state.visible && this.state.elevated, ["collapsed"]: this.state.visible && this.state.collapsed,
["hidden"]: !this.state.visible, ["hidden"]: !this.state.visible,
} }
) )
@ -361,6 +360,5 @@ export default class Sidebar extends React.Component {
</> </>
} }
</div> </div>
)
} }
} }