@@ -63,68 +63,66 @@ const RequestBody = ({ nodeId, nodeData }) => {
6363
6464 return (
6565 < >
66- < div className = 'px-2 py-4 border-t border-neutral-300 bg-slate-100' >
67- < div className = 'flex items-center justify-between font-medium' >
68- < h3 > Body</ h3 >
69- < Menu as = 'div' className = 'relative inline-block text-left' >
70- < Menu . Button data-click-from = 'body-type-menu' className = 'p-2' >
71- < EllipsisVerticalIcon className = 'w-4 h-4' aria-hidden = 'true' data-click-from = 'body-type-menu' />
72- </ Menu . Button >
73- < Transition
74- as = { Fragment }
75- enter = 'transition ease-out duration-100'
76- enterFrom = 'transform opacity-0 scale-95'
77- enterTo = 'transform opacity-100 scale-100'
78- leave = 'transition ease-in duration-75'
79- leaveFrom = 'transform opacity-100 scale-100'
80- leaveTo = 'transform opacity-0 scale-95'
66+ < div className = 'flex items-center justify-between p-4 border-t border-neutral-300 bg-slate-100' >
67+ < h3 > Body</ h3 >
68+ < Menu as = 'div' className = 'relative inline-block text-left' >
69+ < Menu . Button data-click-from = 'body-type-menu' >
70+ < EllipsisVerticalIcon className = 'w-4 h-4' aria-hidden = 'true' data-click-from = 'body-type-menu' />
71+ </ Menu . Button >
72+ < Transition
73+ as = { Fragment }
74+ enter = 'transition ease-out duration-100'
75+ enterFrom = 'transform opacity-0 scale-95'
76+ enterTo = 'transform opacity-100 scale-100'
77+ leave = 'transition ease-in duration-75'
78+ leaveFrom = 'transform opacity-100 scale-100'
79+ leaveTo = 'transform opacity-0 scale-95'
80+ >
81+ < Menu . Items
82+ className = 'absolute right-0 z-10 w-56 px-1 py-1 mt-2 origin-top-right bg-white divide-y divide-gray-100 rounded-md shadow-lg ring-1 ring-black/5 focus:outline-none'
83+ data-click-from = 'body-type-menu'
8184 >
82- < Menu . Items
83- className = 'absolute right-0 z-10 w-56 px-1 py-1 mt-2 origin-top-right bg-white divide-y divide-gray-100 rounded-md shadow-lg ring-1 ring-black/5 focus:outline-none'
84- data-click-from = 'body-type-menu'
85- >
86- { requestBodyTypeOptions . map ( ( bodyTypeOption , index ) => (
87- < Menu . Item key = { index } data-click-from = 'body-type-menu' onClick = { ( ) => handleClose ( bodyTypeOption ) } >
88- < button
89- className = 'flex items-center w-full px-2 py-2 text-sm text-gray-900 rounded-md group hover:bg-slate-100'
90- data-click-from = 'body-type-menu'
91- >
92- { bodyTypeOption }
93- </ button >
94- </ Menu . Item >
95- ) ) }
96- </ Menu . Items >
97- </ Transition >
98- </ Menu >
99- </ div >
85+ { requestBodyTypeOptions . map ( ( bodyTypeOption , index ) => (
86+ < Menu . Item key = { index } data-click-from = 'body-type-menu' onClick = { ( ) => handleClose ( bodyTypeOption ) } >
87+ < button
88+ className = 'flex items-center w-full px-2 py-2 text-sm text-gray-900 rounded-md group hover:bg-slate-100'
89+ data-click-from = 'body-type-menu'
90+ >
91+ { bodyTypeOption }
92+ </ button >
93+ </ Menu . Item >
94+ ) ) }
95+ </ Menu . Items >
96+ </ Transition >
97+ </ Menu >
10098 </ div >
10199 { nodeData . requestBody && nodeData . requestBody . type === 'raw-json' && (
102- < div className = 'p-2 border border-t border-neutral-300 bg-slate-50' >
100+ < div className = 'p-4 border-t border-neutral-300 bg-slate-50' >
103101 < textarea
104102 placeholder = 'Enter json'
105- className = 'w-full p-2 nodrag nowheel'
103+ className = 'w-full p-2 nodrag nowheel min-w-72 '
106104 name = 'username'
107105 onChange = { ( e ) => handleRawJson ( e ) }
108- rows = { 4 }
106+ rows = { 6 }
109107 value = { nodeData . requestBody . body }
110108 />
111109 </ div >
112110 ) }
113111 { nodeData . requestBody && nodeData . requestBody . type === 'form-data' && (
114- < div className = 'p-2 border-t border-neutral-300 bg-slate-50' >
115- < div className = 'flex items-center justify-between text-sm border rounded-md border-neutral-500 text-neutral-500 outline-0 focus:ring-0 ' >
112+ < div className = 'p-4 border-t border-neutral-300 bg-slate-50' >
113+ < div className = 'flex items-center justify-between h-full text-sm border rounded-md border-neutral-500 text-neutral-500 ' >
116114 < input
117115 placeholder = 'key'
118- className = 'pl -4 nodrag nowheel bg-slate-50 '
116+ className = 'px -4 py-2 bg-transparent nodrag nowheel outline-0 focus:ring-0 '
119117 name = 'variable-value'
120118 onChange = { ( e ) => handleFormDataKey ( e ) }
121119 value = { nodeData . requestBody . body . key }
122120 />
123- < div className = 'px-4 py-2 border-l rounded-br-md rounded-tr-md border-l-neutral-500' > File</ div >
121+ < div className = 'p-4 border-l rounded-br-md rounded-tr-md border-l-neutral-500' > File</ div >
124122 </ div >
125- < div className = 'py-2 ' >
123+ < div className = 'pt-4 ' >
126124 < button
127- className = 'flex items-center justify-center w-full gap-2 p -2 border rounded-md cursor-pointer border-neutral-500 bg-slate-100 hover:bg-slate-200'
125+ className = 'flex items-center justify-center w-full gap-2 px-4 py -2 border rounded-md cursor-pointer border-neutral-500 bg-slate-100 hover:bg-slate-200'
128126 onClick = { ( ) => {
129127 uploadFileForRequestNode . current . click ( ) ;
130128 } }
@@ -136,7 +134,9 @@ const RequestBody = ({ nodeId, nodeData }) => {
136134 < input type = 'file' id = 'file' ref = { uploadFileForRequestNode } onChange = { handleFileUpload } />
137135 </ div >
138136 </ button >
139- { nodeData . requestBody . body . name != '' ? nodeData . requestBody . body . name : 'Choose a file to upload' }
137+ < div className = 'pt-1' >
138+ { nodeData . requestBody . body . name != '' ? nodeData . requestBody . body . name : 'Choose a file to upload' }
139+ </ div >
140140 </ div >
141141 </ div >
142142 ) }
0 commit comments