Use @uiw/react-codemirror and react@18

Updating redocly to latest and leveraging `@uiw/react-codemirror` which
it also uses.
This commit is contained in:
Caleb Kniffen
2023-12-07 16:43:49 -06:00
committed by mDuo13
parent b05a80c372
commit e314ebb76c
13 changed files with 131 additions and 32486 deletions

View File

@@ -0,0 +1,15 @@
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(),
]
}
/>
}