From d4096d7e163722ca964d72a5b2667d37e3725e49 Mon Sep 17 00:00:00 2001 From: Jake Dexheimer Date: Sun, 16 Jul 2017 16:36:40 -0700 Subject: [PATCH] Add window control themes --- components/CodeImage.js | 4 ++-- components/WindowControls.js | 18 +++++++++++++++++ components/svg/Controls.js | 38 +++++++++++++++++------------------- 3 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 components/WindowControls.js diff --git a/components/CodeImage.js b/components/CodeImage.js index 6c0fa61..309edae 100644 --- a/components/CodeImage.js +++ b/components/CodeImage.js @@ -2,7 +2,7 @@ import { EOL } from 'os' import React from 'react' import domtoimage from 'dom-to-image' import CodeMirror from 'react-codemirror' -import WindowControls from '../components/svg/Controls' +import WindowControls from '../components/WindowControls' import Spinner from 'react-spinner' const DEFAULT_SETTINGS = { @@ -63,7 +63,7 @@ class CodeImage extends React.Component { if (this.state.loading === false) { content = (
- { config.windowControls ? : null } + { config.windowControls ? : null } ( +
+ { theme === 'bw' ? : } + +
+) diff --git a/components/svg/Controls.js b/components/svg/Controls.js index be5ba31..afc4993 100644 --- a/components/svg/Controls.js +++ b/components/svg/Controls.js @@ -1,23 +1,21 @@ import React from 'react' -export default () => ( -
- - - - - - - - -
+export const Controls = () => ( + + + + + + + +) + +export const ControlsBW = () => ( + + + + + + + )