Skip to content

Commit

Permalink
Added resetImagePaths
Browse files Browse the repository at this point in the history
  • Loading branch information
NayamAmarshe committed Dec 21, 2022
1 parent 5ddc5a8 commit 6c7ccc9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion renderer/components/ImageOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ const ImageOptions = ({
setZoomAmount,
leftImageRef,
rightImageRef,
resetImagePaths,
}: {
zoomAmount: string;
setZoomAmount: (arg: any) => void;
leftImageRef: React.RefObject<HTMLImageElement>;
rightImageRef: React.RefObject<HTMLImageElement>;
resetImagePaths: () => void;
}) => {
const [zoomLevel, setZoomLevel] = React.useState("125");

Expand Down Expand Up @@ -42,7 +44,9 @@ const ImageOptions = ({

<div className="collapse-content bg-base-100 text-base-content">
<div className="flex max-h-96 flex-col justify-center gap-5 overflow-auto p-5">
<button className="btn-primary btn">Reset Image</button>
<button className="btn-primary btn" onClick={resetImagePaths}>
Reset Image
</button>
<div className="flex flex-row items-center gap-2">
<p className="w-20">Zoom:</p>
<button
Expand Down
1 change: 1 addition & 0 deletions renderer/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ const Home = () => {
setZoomAmount={setZoomAmount}
leftImageRef={leftImageRef}
rightImageRef={rightImageRef}
resetImagePaths={resetImagePaths}
/>
<ReactCompareSlider
itemOne={
Expand Down

0 comments on commit 6c7ccc9

Please sign in to comment.