From 7f7221ee9a3d668de3058e3f5542ac10d4ba48a5 Mon Sep 17 00:00:00 2001 From: Satbir Singh Date: Thu, 31 Oct 2019 10:00:47 +0000 Subject: [PATCH] Passing height and language as props to CodeEditor --- .../src/components/editor/ApiResponseView.tsx | 2 ++ .../src/components/editor/CodeEditor.tsx | 18 +++++++----------- .../src/components/fields/JSONEditorField.tsx | 2 ++ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/client/src/components/editor/ApiResponseView.tsx b/app/client/src/components/editor/ApiResponseView.tsx index 16dab691d8..fe96f93d3b 100644 --- a/app/client/src/components/editor/ApiResponseView.tsx +++ b/app/client/src/components/editor/ApiResponseView.tsx @@ -141,6 +141,8 @@ const ApiResponseView = (props: Props) => { {response.body && ( ` + height: ${props => props.height}px; overflow: auto; `; @@ -20,6 +13,8 @@ interface Props { value: string; onChange?: (value: string) => void; }; + language: string; + height: number; placeholder?: string; } @@ -29,10 +24,11 @@ const CodeEditor = (props: Props) => { minimap: { enabled: false }, readOnly: !props.input.onChange, }; + debugger; return ( - + { typeof value === "string" ? value : JSON.stringify(value, null, 2) }