Skip to content

Commit c7e0849

Browse files
chore: apply code formatting
1 parent 2b5efd6 commit c7e0849

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

components/ds/DividerComponent.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"use client";
22
interface DividerProps {
3-
margin?: 'small' | 'medium' | 'large';
3+
margin?: "small" | "medium" | "large";
44
}
55

6-
const DividerComponent: React.FC<DividerProps> = ({ margin = 'small' }) => {
6+
const DividerComponent: React.FC<DividerProps> = ({ margin = "small" }) => {
77
const marginClasses = {
8-
small: 'my-2',
9-
medium: 'my-6',
10-
large: 'my-8',
8+
small: "my-2",
9+
medium: "my-6",
10+
large: "my-8",
1111
};
1212

1313
return <div className={`bg-border h-[1px] ${marginClasses[margin]}`}></div>;

components/utils/resize-image.utils.test.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ describe("Image Processing Functions", () => {
182182

183183
const cropRect = { x: 50, y: 50, width: 100, height: 50 };
184184

185-
const result = calculateCropDimensions(imgMock, currentImageRefMock, cropRect);
185+
const result = calculateCropDimensions(
186+
imgMock,
187+
currentImageRefMock,
188+
cropRect
189+
);
186190

187191
expect(result).toEqual({
188192
x: 100,
@@ -197,16 +201,20 @@ describe("Image Processing Functions", () => {
197201
width: 1000,
198202
height: 500,
199203
} as HTMLImageElement;
200-
204+
201205
const currentImageRefMock = {
202206
clientWidth: 500,
203207
clientHeight: 250,
204208
} as HTMLImageElement;
205-
209+
206210
const cropRect = { x: 150, y: 150, width: -100, height: -50 };
207-
208-
const result = calculateCropDimensions(imgMock, currentImageRefMock, cropRect);
209-
211+
212+
const result = calculateCropDimensions(
213+
imgMock,
214+
currentImageRefMock,
215+
cropRect
216+
);
217+
210218
expect(result).toEqual({
211219
x: 100,
212220
y: 200,

components/utils/resize-image.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export function calculateCropDimensions(
248248
const scaleY = img.height / currentImageRef.clientHeight;
249249

250250
const x = Math.min(cropRect.x, cropRect.x + cropRect.width) * scaleX;
251-
const y = Math.min(cropRect.y, cropRect.y + cropRect.height) * scaleY;
251+
const y = Math.min(cropRect.y, cropRect.y + cropRect.height) * scaleY;
252252
const width = Math.abs(cropRect.width) * scaleX;
253253
const height = Math.abs(cropRect.height) * scaleY;
254254

pages/utilities/image-to-base64.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function ImageToBase64() {
6464
<Button variant="outline" onClick={() => handleCopyBase64(base64)}>
6565
{buttonBase64}
6666
</Button>
67-
67+
6868
<DividerComponent margin="medium" />
6969

7070
<Label>Use in {"<img>"} tag:</Label>

0 commit comments

Comments
 (0)