()
| 4 | class CodeEditor extends React.Component { |
| 5 | |
| 6 | render() { |
| 7 | const { code, onChange, editorOptions, ...props } = this.props |
| 8 | |
| 9 | const options = { |
| 10 | selectOnLineNumbers: true, |
| 11 | roundedSelection: false, |
| 12 | readOnly: false, |
| 13 | cursorStyle: 'line', |
| 14 | automaticLayout: false, |
| 15 | ...editorOptions |
| 16 | } |
| 17 | |
| 18 | return ( |
| 19 | <MonacoEditor |
| 20 | language="json" |
| 21 | value={code} |
| 22 | options={options} |
| 23 | requireConfig={{ |
| 24 | url: '/vs/loader.js', |
| 25 | paths: { |
| 26 | 'vs': '/vs' |
| 27 | } |
| 28 | }} |
| 29 | {...props} |
| 30 | onChange={onChange} |
| 31 | /> |
| 32 | ) |
| 33 | } |
| 34 | |
| 35 | } |
| 36 |
nothing calls this directly
no outgoing calls
no test coverage detected