We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d037f9c commit 553451eCopy full SHA for 553451e
src/block.tsx
@@ -85,6 +85,8 @@ export const Block: React.FC<Block> = props => {
85
page_small_text
86
} = blockValue.format || {};
87
88
+ const coverPosition = (1 - (page_cover_position || 0.5)) * 100;
89
+
90
return (
91
<div className="notion">
92
{page_cover && (
@@ -93,9 +95,7 @@ export const Block: React.FC<Block> = props => {
93
95
alt={getTextContent(blockValue.properties.title)}
94
96
className="notion-page-cover"
97
style={{
- objectPosition: `center ${
- (1 - (page_cover_position || 0.5)) * 100
98
- }%`
+ objectPosition: `center ${coverPosition}%`
99
}}
100
/>
101
)}
0 commit comments