fix: enchance code editor syle

This commit is contained in:
Joel
2024-03-06 11:23:34 +08:00
parent 430569d486
commit 9839b5cb53
5 changed files with 49 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import useKeyValueList from '../../hooks/use-key-value-list'
import KeyValue from '../key-value'
import TextEditor from '../../../_base/components/editor/text-editor'
import CodeEditor from '../../../_base/components/editor/code-editor'
import { CodeLanguage } from '../../../code/types'
type Props = {
readonly: boolean
@ -123,8 +124,10 @@ const EditBody: FC<Props> = ({
{type === BodyType.json && (
<CodeEditor
readOnly={readonly}
title={<div className='uppercase'>JSON</div>}
value={payload.data} onChange={handleBodyValueChange}
language={CodeLanguage.javascript}
/>
)}
</div>