File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
packages/notion-to-jsx/src/components
Renderer/components/Image Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ const Image = ({
47
47
< div className = { imageContainer } >
48
48
< div className = { imageWrapper } style = { getImageStyles ( format , isColumn ) } >
49
49
< div className = { skeletonWrapper ( { isLoaded } ) } >
50
- < Skeleton variant = "image" />
50
+ < Skeleton variant = "image" isLoading = { ! isLoaded } />
51
51
</ div >
52
52
< img
53
53
className = { imageStyle ( {
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ type SkeletonProps = {
18
18
* 추가 CSS 클래스명
19
19
*/
20
20
className ?: string ;
21
+ /**
22
+ * 로딩 상태
23
+ */
24
+ isLoading ?: boolean ;
21
25
} ;
22
26
23
27
/**
@@ -29,6 +33,7 @@ const Skeleton = ({
29
33
width,
30
34
height,
31
35
className,
36
+ isLoading = true ,
32
37
} : SkeletonProps ) => {
33
38
const getVariantClass = ( ) => {
34
39
switch ( variant ) {
@@ -42,6 +47,10 @@ const Skeleton = ({
42
47
}
43
48
} ;
44
49
50
+ if ( ! isLoading ) {
51
+ return null ;
52
+ }
53
+
45
54
return (
46
55
< div
47
56
className = { `${ styles . skeleton } ${ getVariantClass ( ) } ${ className || '' } ` }
You can’t perform that action at this time.
0 commit comments