Skip to content

Commit

Permalink
Fix spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 24, 2022
1 parent a077f25 commit 0aabc03
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default function PostFormatPanel() {
} )
)
)
).then( () => {
).finally( () => {
setIsUploading( false );
} );
}
Expand All @@ -144,15 +144,18 @@ export default function PostFormatPanel() {
return <Image key={ image.clientId } { ...image } />;
} ) }
</AnimatePresence>
<Button
icon={ upload }
variant="primary"
onClick={ uploadImages }
>
{ __( 'Upload all' ) }
</Button>
{ isUploading ? (
<Spinner />
) : (
<Button
icon={ upload }
variant="primary"
onClick={ uploadImages }
>
{ __( 'Upload all' ) }
</Button>
) }
</div>
{ isUploading && <Spinner /> }
</PanelBody>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Ensure the post-publish panel accounts for the header and footer height.
min-height: calc(100% - #{ $header-height + 84px });

.components-spinner {
> .components-spinner {
display: block;
margin: 100px auto 0;
}
Expand Down

0 comments on commit 0aabc03

Please sign in to comment.