From 46b788664cbd384f1c32037115ab5a1574f2098e Mon Sep 17 00:00:00 2001 From: myanv Date: Fri, 25 Oct 2024 20:52:27 +1300 Subject: [PATCH 1/2] Modify CodeSection so that clicking on entire div collapses code --- ell-studio/src/components/source/CodeSection.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ell-studio/src/components/source/CodeSection.js b/ell-studio/src/components/source/CodeSection.js index 0de2705ee..d3db05f3c 100644 --- a/ell-studio/src/components/source/CodeSection.js +++ b/ell-studio/src/components/source/CodeSection.js @@ -54,12 +54,8 @@ export function CodeSection({ }; return ( -
-
{ - if (e.target === e.currentTarget) { - setShowCode(!showCode); - } - }} +
setShowCode(!showCode)}> +
@@ -70,7 +66,7 @@ export function CodeSection({ {showCode ? : } {title} -
+
e.stopPropagation()}> {enableFormatToggle && (