mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 07:22:34 +00:00
animated sidepanel (#7970)
* animated sidepanel * optimize --------- Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
@@ -22,10 +22,10 @@ const propTypes = {
|
||||
class SidePanel extends React.Component {
|
||||
|
||||
render() {
|
||||
const { children, isSidePanelFolded, style, eventBus } = this.props;
|
||||
const { children, isSidePanelFolded, style, eventBus, isSidePanelClosed } = this.props;
|
||||
return (
|
||||
<div
|
||||
className={classnames('side-panel', { 'side-panel-folded': isSidePanelFolded, 'left-zero': !this.props.isSidePanelClosed })}
|
||||
className={classnames('side-panel', { 'side-panel-folded': isSidePanelFolded, 'left-zero': !isSidePanelClosed })}
|
||||
style={isSidePanelFolded ? { flexBasis: SIDE_PANEL_FOLDED_WIDTH } : style}
|
||||
>
|
||||
<MediaQuery query="(max-width: 767.8px)">
|
||||
|
@@ -19,6 +19,9 @@
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
transition: flex 0.3s ease-in-out;
|
||||
-webkit-transition: flex 0.3s ease-in-out;
|
||||
-moz-transition: flex 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.user-panel .side-panel-north {
|
||||
@@ -44,9 +47,12 @@
|
||||
width: 300px;
|
||||
max-width: calc(100% - 40px);
|
||||
height:100%;
|
||||
-webkit-transition: all 0.3s ease;
|
||||
-moz-transition: all 0.3s ease;
|
||||
transition: all 0.3s ease;
|
||||
-webkit-transition: left 0.3s ease, width 0.3s ease;
|
||||
-moz-transition: left 0.3s ease, width 0.3s ease;
|
||||
transition: left 0.3s ease, width 0.3s ease;
|
||||
}
|
||||
.side-panel.left-zero {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user