Skip to content

Commit 38be69b

Browse files
authored
fix(ui): better responsiveness for upload fields in sidebar (#8101)
## Description Adjusts the styling for the Dropzone component for upload fields with `admin.position: sidebar`. Before: ![Screenshot 2024-09-06 at 4 10 28 PM](https://github.com/user-attachments/assets/221d43f9-f426-4a44-ba58-29123050c775) After: ![Screenshot 2024-09-06 at 4 09 32 PM](https://github.com/user-attachments/assets/c4369a65-d842-4e65-9153-19244fcf5600) - [x] I have read and understand the [CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md) document in this repository. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist: - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] Existing test suite passes locally with my changes - [ ] I have made corresponding changes to the documentation
1 parent 6b82196 commit 38be69b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/ui/src/elements/Upload/index.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191

9292
&__dropzoneContent {
9393
display: flex;
94+
flex-wrap: wrap;
95+
gap: base(0.4);
9496
justify-content: space-between;
9597
width: 100%;
9698
}
@@ -106,6 +108,7 @@
106108
}
107109

108110
&__dragAndDropText {
111+
flex-shrink: 0;
109112
margin: 0;
110113
text-transform: lowercase;
111114
align-self: center;

packages/ui/src/fields/Upload/index.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
&__dropzoneContent {
1111
display: flex;
12+
flex-wrap: wrap;
13+
gap: base(0.4);
1214
justify-content: space-between;
1315
width: 100%;
1416
}
@@ -34,6 +36,7 @@
3436
}
3537

3638
&__dragAndDropText {
39+
flex-shrink: 0;
3740
margin: 0;
3841
text-transform: lowercase;
3942
align-self: center;

0 commit comments

Comments
 (0)