Skip to content

Commit

Permalink
fix: position field loader relative to sidebar, not fields
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed May 30, 2024
1 parent 8ccfa4c commit 2e8936e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/core/components/Puck/components/Fields/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ export const Fields = () => {
</Wrapper>
{isLoading && (
<div className={getClassName("loadingOverlay")}>
<Loader size={32} />
<div className={getClassName("loadingOverlayInner")}>
<Loader size={16} />
</div>
</div>
)}
</form>
Expand Down
14 changes: 10 additions & 4 deletions packages/core/components/Puck/components/Fields/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.PuckFields {
position: relative;
font-family: var(--puck-font-family);
}

Expand All @@ -10,14 +9,21 @@
.PuckFields-loadingOverlay {
background: var(--puck-color-white);
display: flex;
justify-content: center;
align-items: center;
justify-content: flex-end;
align-items: flex-start;
height: 100%;
width: 100%;
top: 0;
top: 0px;
position: absolute;
z-index: 1;
pointer-events: all;
box-sizing: border-box;
opacity: 0.8;
}

.PuckFields-loadingOverlayInner {
display: flex;
padding: 16px;
position: sticky;
top: 0;
}

0 comments on commit 2e8936e

Please sign in to comment.