Files
xrpl-dev-portal/content/shared/editor/javascript-editor.tsx
Caleb Kniffen e314ebb76c Use @uiw/react-codemirror and react@18
Updating redocly to latest and leveraging `@uiw/react-codemirror` which
it also uses.
2024-01-31 16:07:14 -08:00

16 lines
395 B
TypeScript

import { javascript } from '@codemirror/lang-javascript'
import { Editor, EditorWrapperProps } from './editor'
export const JavascriptEditor = ({value, onChange, readOnly }: EditorWrapperProps) => {
return <Editor
value={value}
onChange={onChange}
readOnly={readOnly}
extensions={
[
javascript(),
]
}
/>
}