File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
packages/notion-to-jsx/src/components/Renderer/components/Image Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ export interface ImageProps {
23
23
format ?: ImageFormat ;
24
24
}
25
25
26
+ const MAX_WIDTH = 720 ;
27
+
26
28
const Image : React . FC < ImageProps > = ( {
27
29
src,
28
30
alt,
@@ -48,7 +50,9 @@ const Image: React.FC<ImageProps> = ({
48
50
format ?. block_width
49
51
? {
50
52
width :
51
- format . block_width > 900 ? '100%' : `${ format . block_width } px` ,
53
+ format . block_width > MAX_WIDTH
54
+ ? '100%'
55
+ : `${ format . block_width } px` ,
52
56
}
53
57
: undefined
54
58
}
@@ -58,7 +62,7 @@ const Image: React.FC<ImageProps> = ({
58
62
className = { placeholder }
59
63
style = { {
60
64
width : format ?. block_width
61
- ? format . block_width > 900
65
+ ? format . block_width > MAX_WIDTH
62
66
? '100%'
63
67
: `${ format . block_width } px`
64
68
: '100%' ,
@@ -97,7 +101,7 @@ const Image: React.FC<ImageProps> = ({
97
101
className = { placeholder }
98
102
style = { {
99
103
width : format ?. block_width
100
- ? format . block_width > 900
104
+ ? format . block_width > MAX_WIDTH
101
105
? '100%'
102
106
: `${ format . block_width } px`
103
107
: '100%' ,
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ export const imageContainer = style({
15
15
alignItems : 'center' ,
16
16
} ) ;
17
17
18
- // CSS 변수 생성
19
18
export const imageWidthVar = createVar ( ) ;
20
19
export const imageAspectRatioVar = createVar ( ) ;
21
20
You can’t perform that action at this time.
0 commit comments