fix: improve sidebar animation (#1814)

This commit is contained in:
Peng Xiao
2023-04-04 17:14:44 +08:00
committed by GitHub
parent 5129ab3db8
commit c023d0a2b8
3 changed files with 15 additions and 10 deletions

View File

@@ -15,9 +15,9 @@ export const StyledSliderBarWrapper = styled('div')<{
userSelect: 'none',
},
zIndex: theme.zIndex.modal,
transition: resizing ? '' : 'transform .3s',
transition: resizing ? '' : 'transform .3s, width .3s, max-width .3s',
transform: show ? 'translateX(0)' : 'translateX(-100%)',
maxWidth: floating ? undefined : 'calc(100vw - 698px)',
maxWidth: floating ? 'calc(10vw + 400px)' : 'calc(100vw - 698px)',
background:
!floating && macosElectron ? 'transparent' : theme.colors.hubBackground,
borderRight: macosElectron ? '' : '1px solid',