Skip to content

Commit 8b09b35

Browse files
committed
style: update styles. #57
1 parent 3f1c437 commit 8b09b35

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

src/codemirror.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
.CodeMirror {
44
/* Set height, width, borders, and global font properties here */
5-
font-family: monospace;
6-
height: 300px;
5+
font-family: 'source-code-pro', Menlo, 'Courier New', Consolas, monospace;
76
color: black;
87
direction: ltr;
8+
font-size: 14px;
9+
z-index: 0;
10+
border-radius: 5px;
11+
height: auto;
12+
background: transparent;
913
}
1014

1115
/* PADDING */

src/index.css

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React, { useRef, useEffect, useImperativeHandle, useState, useMemo } from
22
import CodeMirror from 'codemirror';
33
import 'codemirror/mode/meta';
44
import './codemirror.css';
5-
import './index.css';
65

76
const defaultOptions = {
87
tabSize: 2,
@@ -97,7 +96,7 @@ function ReactCodeMirror(props = {}, ref) {
9796
useMemo(() => {
9897
if (!editor || !window) return;
9998
setOptions(editor, {...defaultOptions, ...options});
100-
}, [options]);
99+
}, [editor, options]);
101100

102101
return (
103102
<textarea ref={textareaRef} />

0 commit comments

Comments
 (0)