Skip to content

Commit

Permalink
style: update styles. #57
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 27, 2021
1 parent 3f1c437 commit 8b09b35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
8 changes: 6 additions & 2 deletions src/codemirror.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
font-family: 'source-code-pro', Menlo, 'Courier New', Consolas, monospace;
color: black;
direction: ltr;
font-size: 14px;
z-index: 0;
border-radius: 5px;
height: auto;
background: transparent;
}

/* PADDING */
Expand Down
8 changes: 0 additions & 8 deletions src/index.css

This file was deleted.

3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useRef, useEffect, useImperativeHandle, useState, useMemo } from
import CodeMirror from 'codemirror';
import 'codemirror/mode/meta';
import './codemirror.css';
import './index.css';

const defaultOptions = {
tabSize: 2,
Expand Down Expand Up @@ -97,7 +96,7 @@ function ReactCodeMirror(props = {}, ref) {
useMemo(() => {
if (!editor || !window) return;
setOptions(editor, {...defaultOptions, ...options});
}, [options]);
}, [editor, options]);

return (
<textarea ref={textareaRef} />
Expand Down

0 comments on commit 8b09b35

Please sign in to comment.