Skip to content

Commit 12a15e6

Browse files
committed
updated
1 parent 366ef7f commit 12a15e6

File tree

4 files changed

+47
-25
lines changed

4 files changed

+47
-25
lines changed

example/example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ReactDom.render(
1616
<br />
1717

1818
{/* use a base16 theme */}
19-
<JsonViewer src={getExampleJson1()} theme="monokai" />
19+
<JsonViewer src={getExampleJson1()} theme='monokai' />
2020

2121
<br />
2222

src/js/themes/base16/rjv-default.js

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

src/js/themes/base16/rjv-themes.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
export const rjv_default = {
2+
scheme: 'rjv-default',
3+
author: 'mac gainor',
4+
base00: 'rgba(1, 1, 1, 0)',
5+
base01: '#eee8d5',
6+
base02: 'rgba(0, 0, 0, 0.1)',
7+
base03: '#93a1a1',
8+
base04: 'rgba(0, 0, 0, 0.3)',
9+
base05: '#586e75',
10+
base06: '#073642',
11+
base07: '#002b36',
12+
base08: '#d33682',
13+
base09: '#cb4b16',
14+
base0A: '#dc322f',
15+
base0B: '#859900',
16+
base0C: '#6c71c4',
17+
base0D: '#586e75',
18+
base0E: '#2aa198',
19+
base0F: '#268bd2'
20+
};
21+
22+
export const rjv_grey = {
23+
scheme: 'rjv-grey',
24+
author: 'mac gainor',
25+
base00: 'rgba(1, 1, 1, 0)',
26+
base01: 'rgba(1, 1, 1, 0.1)',
27+
base02: 'rgba(0, 0, 0, 0.2)',
28+
base03: 'rgba(1, 1, 1, 0.3)',
29+
base04: 'rgba(0, 0, 0, 0.4)',
30+
base05: 'rgba(1, 1, 1, 0.5)',
31+
base06: 'rgba(1, 1, 1, 0.6)',
32+
base07: 'rgba(1, 1, 1, 0.7)',
33+
base08: 'rgba(1, 1, 1, 0.8)',
34+
base09: 'rgba(1, 1, 1, 0.8)',
35+
base0A: 'rgba(1, 1, 1, 0.8)',
36+
base0B: 'rgba(1, 1, 1, 0.8)',
37+
base0C: 'rgba(1, 1, 1, 0.8)',
38+
base0D: 'rgba(1, 1, 1, 0.8)',
39+
base0E: 'rgba(1, 1, 1, 0.8)',
40+
base0F: 'rgba(1, 1, 1, 0.8)'
41+
};

src/js/themes/getStyle.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import rjvDefault from './base16/rjv-default';
1+
import {rjv_default, rjv_grey} from './base16/rjv-themes';
22
import styleConstants from './styleConstants';
33
import {createStyling} from 'react-base16-styling';
44

@@ -161,12 +161,13 @@ const getDefaultThemeStyling = theme => {
161161
};
162162

163163
const getStyle = (theme) => {
164-
if (!theme) {
165-
return () => {};
164+
let rjv_theme = rjv_default;
165+
if (theme === false || theme === 'none') {
166+
rjv_theme = rjv_grey;
166167
}
167168
return createStyling(
168169
getDefaultThemeStyling,
169-
{defaultBase16: rjvDefault},
170+
{defaultBase16: rjv_theme},
170171
)(theme);
171172
}
172173

0 commit comments

Comments
 (0)