From f4f23541eaf3c7b513e4fde4a60256f55dcedbfe Mon Sep 17 00:00:00 2001 From: Michael Fix Date: Wed, 14 Nov 2018 16:11:27 -0800 Subject: [PATCH] Create dark watermark (#577) - Closes #575 --- components/Carbon.js | 10 ++++++++-- components/svg/Watermark.js | 8 ++++---- lib/constants.js | 12 ++++++++---- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/components/Carbon.js b/components/Carbon.js index 3b12234..2296570 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -7,7 +7,13 @@ import { Controlled as CodeMirror } from 'react-codemirror2' import WindowControls from '../components/WindowControls' import Watermark from '../components/svg/Watermark' -import { COLORS, LANGUAGE_MODE_HASH, LANGUAGE_NAME_HASH, DEFAULT_SETTINGS } from '../lib/constants' +import { + COLORS, + LANGUAGE_MODE_HASH, + LANGUAGE_NAME_HASH, + THEMES_HASH, + DEFAULT_SETTINGS +} from '../lib/constants' class Carbon extends React.PureComponent { static defaultProps = { @@ -98,7 +104,7 @@ class Carbon extends React.PureComponent { value={this.props.children} options={options} /> - {config.watermark && } + {config.watermark && }
diff --git a/components/svg/Watermark.js b/components/svg/Watermark.js index a8290f3..c2b6fe6 100644 --- a/components/svg/Watermark.js +++ b/components/svg/Watermark.js @@ -1,6 +1,6 @@ import React from 'react' -export default () => ( +export default ({ light }) => ( ( > - + - + diff --git a/lib/constants.js b/lib/constants.js index 0eab315..827bcbf 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -30,7 +30,8 @@ export const THEMES = [ }, { id: 'base16-light', - name: 'Base 16 (Light)' + name: 'Base 16 (Light)', + light: true }, { id: 'cobalt', @@ -74,7 +75,8 @@ export const THEMES = [ }, { id: 'one-light', - name: 'One Light' + name: 'One Light', + light: true }, { id: 'one-dark', @@ -100,7 +102,8 @@ export const THEMES = [ { id: 'solarized light', name: 'Solarized (Light)', - link: 'solarized' + link: 'solarized', + light: true }, { id: 'tomorrow-night-bright', @@ -116,7 +119,8 @@ export const THEMES = [ }, { id: 'yeti', - name: 'Yeti' + name: 'Yeti', + light: true }, { id: 'zenburn',