Skip to content

Commit ce5ebd8

Browse files
committed
Moved certain paddings of UserImages component into a css file
1 parent 5aee581 commit ce5ebd8

2 files changed

Lines changed: 26 additions & 5 deletions

File tree

view/src/components/UserImages.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {useEffect, useState} from 'react';
22
import '../App.css';
3+
import './styles/UserImages.css';
34
import '../assets/fonts/PixelifySans/PixelifySans-VariableFont_wght.ttf';
45
import axios from '../api/axios';
56
import {renderPixelDataToImage} from '../utils/pixelRenderer';
@@ -116,7 +117,7 @@ function UserImages() {
116117
};
117118

118119
return (
119-
<div className="flex flex-col md:flex-row w-full h-9/10 gap-4 px-2">
120+
<div className="flex flex-col md:flex-row w-full gap-4 px-2">
120121
{/* GALLERY SIDE */}
121122
<div className="w-full md:w-3/4 p-2 flex flex-col h-full">
122123
<div
@@ -171,7 +172,7 @@ function UserImages() {
171172

172173
{/* Pagination */}
173174
<div
174-
className="flex justify-center items-center gap-4 p-2 text-xs border-t border-gray-300 mt-4"
175+
className="flex justify-center items-center gap-4 image-panel-container text-xs border-t border-gray-300 arrows"
175176
style={{fontFamily: '"Pixelify Sans", sans-serif'}}
176177
>
177178
<button
@@ -195,7 +196,7 @@ function UserImages() {
195196
<div className="w-full md:w-1/4 p-2 flex flex-col items-center h-auto md:h-full">
196197
{selectedDesign ? (
197198
<div
198-
className="w-full bg-white border border-gray-300 rounded-xl shadow-md p-4 flex flex-col items-center space-y-4 mb-10"
199+
className="w-full bg-white border border-gray-300 rounded-xl shadow-md flex flex-col items-center space-y-4 selected-box"
199200
style={{maxHeight: '80vh', overflowY: 'auto'}}
200201
>
201202
<img
@@ -224,7 +225,7 @@ function UserImages() {
224225
</div>
225226

226227
<div
227-
className="flex flex-col w-full max-w-xs space-y-4 mt-4"
228+
className="flex flex-col w-full max-w-xs space-y-4 selected-buttons"
228229
style={{fontFamily: '"Pixelify Sans", sans-serif'}}
229230
>
230231
{selectedDesign.is_approved ? (
@@ -278,7 +279,7 @@ function UserImages() {
278279
</div>
279280
) : (
280281
<div
281-
className="text-gray-400 text-center text-lg w-full h-full flex items-center justify-center border border-gray-300 rounded-lg p-4">
282+
className="text-gray-400 text-center text-lg w-full h-full flex items-center justify-center border border-gray-300 rounded-lg no-design-box">
282283
No design selected
283284
</div>
284285
)}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.space-y-4 > * + * {
2+
margin-top: 1rem;
3+
}
4+
5+
.image-panel-container {
6+
padding: 0.5rem;
7+
}
8+
9+
.selected-box {
10+
padding: 1rem;
11+
}
12+
13+
.no-design-box {
14+
padding: 1rem;
15+
}
16+
17+
.arrows{
18+
margin-top: 1rem;
19+
}
20+

0 commit comments

Comments
 (0)