mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-03 11:11:38 +03:00
fix(core): add margin to scrollbar when clientBorder has no style (#6867)
close #6684 https://github.com/toeverything/AFFiNE/assets/102217452/9de18009-c718-4bdd-88fd-caafdb5b419c
This commit is contained in:
parent
e2b057cb93
commit
b8a1fbd6c7
@ -32,3 +32,7 @@ export const affineDocViewport = style({
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const scrollbar = style({
|
||||
marginRight: '4px',
|
||||
});
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Scrollable } from '@affine/component';
|
||||
import { PageDetailSkeleton } from '@affine/component/page-detail-skeleton';
|
||||
import { PageAIOnboarding } from '@affine/core/components/affine/ai-onboarding';
|
||||
import { useAppSettingHelper } from '@affine/core/hooks/affine/use-app-setting-helper';
|
||||
import type { PageRootService } from '@blocksuite/blocks';
|
||||
import {
|
||||
BookmarkService,
|
||||
@ -90,6 +91,7 @@ const DetailPageImpl = memo(function DetailPageImpl() {
|
||||
const rightSidebar = useService(RightSidebarService).rightSidebar;
|
||||
const docCollection = workspace.docCollection;
|
||||
const mode = useLiveData(doc.mode$);
|
||||
const { appSettings } = useAppSettingHelper();
|
||||
|
||||
const isActiveView = useIsActiveView();
|
||||
// TODO: remove jotai here
|
||||
@ -252,7 +254,11 @@ const DetailPageImpl = memo(function DetailPageImpl() {
|
||||
docCollection={docCollection}
|
||||
/>
|
||||
</Scrollable.Viewport>
|
||||
<Scrollable.Scrollbar />
|
||||
<Scrollable.Scrollbar
|
||||
className={clsx({
|
||||
[styles.scrollbar]: !appSettings.clientBorder,
|
||||
})}
|
||||
/>
|
||||
</Scrollable.Root>
|
||||
</AffineErrorBoundary>
|
||||
{isInTrash ? <TrashPageFooter /> : null}
|
||||
|
Loading…
Reference in New Issue
Block a user