From 90e6ea18850ee01af21b65a9cff4537d9018c606 Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Thu, 22 Jul 2021 20:53:38 +0300 Subject: Make Tweaks closable --- pages/index.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pages') diff --git a/pages/index.tsx b/pages/index.tsx index e0619ba..04f1fc7 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -178,6 +178,7 @@ export function GraphPage() { }, []) const [threeDim, setThreeDim] = useState(false) + const [showTweeks, setShowTweeks] = useState(true) if (!graphData) { return null @@ -185,13 +186,16 @@ export function GraphPage() { return (
- + onClose={() => { + setShowTweeks(false) + }} + />} void } export const Tweaks = function (props: TweakProps) { - const { physics, setPhysics, threeDim } = props + const { physics, setPhysics, threeDim, onClose } = props return ( setPhysics(initialPhysics)} /> - + -- cgit v1.2.3