fix: text being squeezed in the sidebar animation (#1470)

This commit is contained in:
sheben
2023-03-10 03:44:22 +08:00
committed by GitHub
parent 87a4874df3
commit d0c1b4508e
2 changed files with 2 additions and 3 deletions

View File

@@ -106,8 +106,6 @@ export const WorkSpaceSliderBar: React.FC<WorkSpaceSliderBarProps> = ({
const currentWorkspaceId = currentWorkspace?.id || null;
const [showSubFavorite, setOpenSubFavorite] = useState(true);
const { t } = useTranslation();
const [open] = useSidebarStatus();
const [sidebarOpen] = useSidebarStatus();
const pageMeta = usePageMeta(currentWorkspace?.blockSuiteWorkspace ?? null);
const onClickNewPage = useCallback(async () => {
@@ -121,7 +119,7 @@ export const WorkSpaceSliderBar: React.FC<WorkSpaceSliderBarProps> = ({
<StyledSliderBar show={isPublicWorkspace ? false : sidebarOpen}>
<StyledSidebarWrapper>
<SidebarSwitch
visible={open}
visible={sidebarOpen}
tooltipContent={t('Collapse sidebar')}
testid="sliderBar-arrowButton-collapse"
/>

View File

@@ -5,6 +5,7 @@ export const StyledSliderBar = styled('div')<{ show: boolean }>(
({ theme, show }) => {
return {
width: show ? '256px' : '0',
whiteSpace: 'nowrap',
height: '100vh',
minHeight: '450px',
background: theme.colors.hubBackground,