Skip to content

Commit 23add81

Browse files
feat: add hideHeader flag
1 parent e971f84 commit 23add81

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Diff for: src/block.tsx

+9-5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ interface Block {
6161
mapImageUrl: MapImageUrl;
6262

6363
fullPage?: boolean;
64+
hideHeader?: boolean;
6465
}
6566

6667
export const Block: React.FC<Block> = props => {
@@ -69,6 +70,7 @@ export const Block: React.FC<Block> = props => {
6970
children,
7071
level,
7172
fullPage,
73+
hideHeader,
7274
blockMap,
7375
mapPageUrl,
7476
mapImageUrl
@@ -97,11 +99,13 @@ export const Block: React.FC<Block> = props => {
9799
<div className="notion notion-app">
98100
<div className="notion-cursor-listener">
99101
<div className="notion-frame">
100-
<PageHeader
101-
blockMap={blockMap}
102-
mapPageUrl={mapPageUrl}
103-
mapImageUrl={mapImageUrl}
104-
/>
102+
{!hideHeader && (
103+
<PageHeader
104+
blockMap={blockMap}
105+
mapPageUrl={mapPageUrl}
106+
mapImageUrl={mapImageUrl}
107+
/>
108+
)}
105109

106110
<div className="notion-scroller">
107111
{page_cover && (

Diff for: src/renderer.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { defaultMapImageUrl, defaultMapPageUrl } from "./utils";
66
export interface NotionRendererProps {
77
blockMap: BlockMapType;
88
fullPage?: boolean;
9+
hideHeader?: boolean;
910
mapPageUrl?: MapPageUrl;
1011
mapImageUrl?: MapImageUrl;
1112

0 commit comments

Comments
 (0)