From 17c96519f39b18820aeb52aae62caf8397be3e78 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Wed, 22 Nov 2023 10:40:27 +0100 Subject: [PATCH] :bug: [#59] Fix overflow from select being cut off in preview --- src/components/ComponentPreview.tsx | 8 ++++++-- src/components/JSONPreview.tsx | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/ComponentPreview.tsx b/src/components/ComponentPreview.tsx index a9c54ba9..bdb856c8 100644 --- a/src/components/ComponentPreview.tsx +++ b/src/components/ComponentPreview.tsx @@ -37,7 +37,7 @@ const ComponentPreviewWrapper: React.FC = ({ onChange={event => setpreviewMode(event.target.value as PreviewState)} /> -
+
{previewMode === 'editJSON' ? ( = ({ }} >
- {previewMode === 'rich' ? children : } + {previewMode === 'rich' ? ( + children + ) : ( + + )}
)} diff --git a/src/components/JSONPreview.tsx b/src/components/JSONPreview.tsx index c919612b..20aa3614 100644 --- a/src/components/JSONPreview.tsx +++ b/src/components/JSONPreview.tsx @@ -3,8 +3,12 @@ interface JSONPreviewProps { className?: string; } -const JSONPreview: React.FC = ({data, className = ''}) => ( -
+const JSONPreview: React.FC = ({
+  data,
+  className = '',
+  ...props
+}) => (
+  
     {JSON.stringify(data, null, 2)}
   
);