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 = ({
4747 < div className = { imageContainer } >
4848 < div className = { imageWrapper } style = { getImageStyles ( format , isColumn ) } >
4949 < div className = { skeletonWrapper ( { isLoaded } ) } >
50- < Skeleton variant = "image" />
50+ < Skeleton variant = "image" isLoading = { ! isLoaded } />
5151 </ div >
5252 < img
5353 className = { imageStyle ( {
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ type SkeletonProps = {
1818 * 추가 CSS 클래스명
1919 */
2020 className ?: string ;
21+ /**
22+ * 로딩 상태
23+ */
24+ isLoading ?: boolean ;
2125} ;
2226
2327/**
@@ -29,6 +33,7 @@ const Skeleton = ({
2933 width,
3034 height,
3135 className,
36+ isLoading = true ,
3237} : SkeletonProps ) => {
3338 const getVariantClass = ( ) => {
3439 switch ( variant ) {
@@ -42,6 +47,10 @@ const Skeleton = ({
4247 }
4348 } ;
4449
50+ if ( ! isLoading ) {
51+ return null ;
52+ }
53+
4554 return (
4655 < div
4756 className = { `${ styles . skeleton } ${ getVariantClass ( ) } ${ className || '' } ` }
You can’t perform that action at this time.
0 commit comments