From 8f0ca4a9ca23c631d60a1e076fe8d7f3abce0ef8 Mon Sep 17 00:00:00 2001 From: "pramod.mahajan" Date: Fri, 17 Oct 2025 12:26:57 +0530 Subject: [PATCH] added ratoted image inside preview documents --- src/components/Expenses/PreviewDocument.jsx | 68 ++++++++++++--------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/src/components/Expenses/PreviewDocument.jsx b/src/components/Expenses/PreviewDocument.jsx index 786cdf64..ce554ca9 100644 --- a/src/components/Expenses/PreviewDocument.jsx +++ b/src/components/Expenses/PreviewDocument.jsx @@ -1,42 +1,54 @@ -import { useState } from 'react'; - +import { useState } from "react"; const PreviewDocument = ({ imageUrl }) => { const [loading, setLoading] = useState(true); - const [rotation, setRotation] = useState(0); // Rotation angle + const [rotation, setRotation] = useState(0); return ( -
+ <> +
+ setRotation((prev) => prev + 90)} + > +
+
+ {loading && ( -
- Loading... -
+
Loading...
)} - Full View setLoading(false)} - /> +
+ Full View setLoading(false)} + /> +
- {/* Rotate Button */} - +
+ +
+ ); }; export default PreviewDocument; -