Skip to content

Commit 16291cb

Browse files
committed
chore: rename variables
1 parent 6757e63 commit 16291cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Preview.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ import { useRef, useState, type FC } from "react";
99
import type { ImperativePanelHandle } from "react-resizable-panels";
1010

1111
export const Preview: FC = () => {
12+
const [errorPanelSize, setErrorPanelSize] = useState(() => 50);
1213
const errorPanelRef = useRef<ImperativePanelHandle>(null);
14+
1315
const onCollapseError = () => {
1416
errorPanelRef.current?.collapse();
1517
};
16-
const [overlayOpacity, setOverlayOpacity] = useState(() => 50);
1718

1819
return (
1920
<ResizablePanel className="relative flex flex-col items-start gap-6 p-8">
2021
<div
2122
className="pointer-events-none absolute top-0 left-0 h-full w-full bg-black"
22-
style={{ opacity: overlayOpacity / 100 }}
23+
style={{ opacity: errorPanelSize / 100 }}
2324
>
2425
{/* OVERLAY */}
2526
</div>
@@ -82,7 +83,7 @@ export const Preview: FC = () => {
8283
collapsible={true}
8384
collapsedSize={0}
8485
onResize={(size) => {
85-
setOverlayOpacity(() => size);
86+
setErrorPanelSize(() => size);
8687
}}
8788
></ResizablePanel>
8889
</ResizablePanelGroup>

0 commit comments

Comments
 (0)