A thin control wrapper around the [react-codemirror](https://github.com/scniro/react-codemirror2) component, with inspiration from [ReadMe's own syntax highlighting package](https://github.com/readmeio/api-explorer/blob/master/packages/syntax-highlighter).

```jsx
const code = `function getMode(lang) {
  let mode = lang;
  if (mode in modes) {
    mode = modes[mode];
    if (Array.isArray(mode)) [, mode] = mode;
  }
  return mode;
}`;

let lastClickedLine;
<CodeEditor
  lang={'js'}
  onGutterClick={(editor, line, _cn, { shiftKey }) =>
    console.log(`line %o clicked`, line, shiftKey && '(with shift key)')
  }>
  {code}
</CodeEditor>;
```

<blockquote>
<details>
<summary><b>Editor Events APIs</b></summary>

Pass a callback to these props to hook in to [CodeMirror's events](https://codemirror.net/doc/manual.html#events).

Event Handler          | Callback Arguments                                                                                                        
---------------------- | --------------------------------------------------------------------------------------------------------------------------
**`onBlur`**           |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_blur 'blur')
**`onContextMenu`**    |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'contextmenu')
**`onCopy`**           |  `editor` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'copy')
**`onCursor`**         |  `editor`, `data` [📘docs](https://codemirror.net/doc/manual.html#event_doc_cursorActivity 'cursorActivity')
**`onCursorActivity`** |  `editor` [📘docs](https://codemirror.net/doc/manual.html#event_cursorActivity 'cursorActivity')
**`onCut`**            |  `editor` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'cut')
**`onDblClick`**       |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'dblclick')
**`onDragEnter`**      |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'dragenter')
**`onDragOver`**       |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'dragover')
**`onDragLeave`**      |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'dragleave')
**`onDragStart`**      |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'dragstart')
**`onDrop`**           |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'drop')
**`onFocus`**          |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_focus 'focus')
**`onGutterClick`**    |  `editor`, `lineNumber`, `gutter`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_gutterClick 'gutterClick')
**`onInputRead`**      |  `editor`, `changeObj` [📘docs](https://codemirror.net/doc/manual.html#events 'gutterClick')
**`onKeyDown`**        |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'keydown')
**`onKeyHandled`**     |  `editor`, `key`, `event` [📘docs](https://codemirror.net/doc/manual.html#events 'keyhandled')
**`onKeyPress`**       |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'keypress')
**`onKeyUp`**          |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'keyup')
**`onMouseDown`**      |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'mousedown')
**`onPaste`**          |  `editor` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'paste')
**`onScroll`**         |  `editor`, `data` [📘docs](https://codemirror.net/doc/manual.html#event_scroll 'scroll')
**`onSelection`**      |  `editor`, `data` [📘docs](https://codemirror.net/doc/manual.html#event_doc_beforeSelectionChange 'beforeSelectionChange')
**`onTouchStart`**     |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_dom 'touchstart')
**`onUpdate`**         |  `editor`, `event` [📘docs](https://codemirror.net/doc/manual.html#event_update 'update')
**`onViewportChange`** |  `editor`, `from`, `to` [📘docs](https://codemirror.net/doc/manual.html#event_viewportChange 'viewportChange')

</details><hr>
</blockquote>
