mirror of
https://github.com/docmost/docmost.git
synced 2026-06-10 01:52:43 +08:00
fix(base): align title and table at the same left edge with shared horizontal padding
Wrap both the title editor and the BaseTable in one outer flex container that owns the horizontal padding (24px on each side). Each child only sets vertical spacing — they no longer fight over their own left positions, so the title's left edge now lines up with the toolbar / first column header below.
This commit is contained in:
@@ -109,25 +109,34 @@ function PageContent({ pageSlug }: { pageSlug: string | undefined }) {
|
||||
<title>{`${page?.icon || ""} ${page?.title || t("untitled")}`}</title>
|
||||
</Helmet>
|
||||
<MemoizedPageHeader readOnly={!canEdit} />
|
||||
<div style={{ padding: "32px 24px 12px" }}>
|
||||
<MemoizedTitleEditor
|
||||
pageId={page.id}
|
||||
slugId={page.slugId}
|
||||
title={page.title}
|
||||
spaceSlug={page.space?.slug ?? ""}
|
||||
editable={canEdit}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
flex: 1,
|
||||
minHeight: 0,
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
paddingInline: 18,
|
||||
paddingInline: 24,
|
||||
}}
|
||||
>
|
||||
<BaseTable pageId={page.id} />
|
||||
<div style={{ paddingTop: 32, paddingBottom: 12 }}>
|
||||
<MemoizedTitleEditor
|
||||
pageId={page.id}
|
||||
slugId={page.slugId}
|
||||
title={page.title}
|
||||
spaceSlug={page.space?.slug ?? ""}
|
||||
editable={canEdit}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
flex: 1,
|
||||
minHeight: 0,
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
<BaseTable pageId={page.id} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user