.loading-content { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; width: 100%; } .panelFlex { height: 100%; width: 100%; overflow: 'hidden'; .preview { position: relative; width: 100%; height: 100%; overflow: 'hidden'; display: flex; justify-content: center; align-items: center; .previewImage { max-width: 100%; max-height: 100%; object-fit: contain; display: block; } } } .icon { position: absolute; top: 10px; right: 10px; z-index: 5; }