1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 20:01:10 +00:00

change side nav tooltip and animation (#6361)

* change side nav tooltip and animation

* fix code warnings
This commit is contained in:
Michael An
2024-07-18 16:07:46 +08:00
committed by GitHub
parent 91ebfd1398
commit 5f42f71486
10 changed files with 243 additions and 35 deletions

View File

@@ -4,6 +4,7 @@ import classnames from 'classnames';
import MediaQuery from 'react-responsive';
import Logo from './logo';
import MainSideNav from './main-side-nav';
import MainSideNavFolded from './main-side-nav-folded';
import { SIDE_PANEL_FOLDED_WIDTH } from '../constants';
const propTypes = {
@@ -32,14 +33,22 @@ class SidePanel extends React.Component {
</div>
</MediaQuery>
<div className="side-panel-center">
{children ? children : (
{children ? children : null}
{(!children && !isSidePanelFolded) &&
<MainSideNav
tabItemClick={this.props.tabItemClick}
currentTab={this.props.currentTab}
isSidePanelFolded={isSidePanelFolded}
toggleFoldSideNav={this.props.toggleFoldSideNav}
/>
)}
}
{(!children && isSidePanelFolded) &&
<MainSideNavFolded
tabItemClick={this.props.tabItemClick}
currentTab={this.props.currentTab}
toggleFoldSideNav={this.props.toggleFoldSideNav}
/>
}
</div>
</div>
);