From 900f01c2d5d89495d22cd89e668888d6c7504582 Mon Sep 17 00:00:00 2001 From: catarak Date: Wed, 14 Sep 2016 12:46:54 -0400 Subject: [PATCH] more dark theme stuff --- client/modules/App/App.js | 15 +- client/modules/IDE/pages/IDEView.js | 290 +++++++++++---------- client/routes.js | 2 +- client/styles/abstracts/_placeholders.scss | 8 +- client/styles/base/_base.scss | 16 +- client/styles/layout/_ide.scss | 15 +- 6 files changed, 176 insertions(+), 170 deletions(-) diff --git a/client/modules/App/App.js b/client/modules/App/App.js index 0c69c4e6..5598225d 100644 --- a/client/modules/App/App.js +++ b/client/modules/App/App.js @@ -1,12 +1,10 @@ import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import DevTools from './components/DevTools'; -import classNames from 'classnames'; class App extends React.Component { constructor(props, context) { super(props, context); - console.log(props); this.state = { isMounted: false }; } @@ -15,14 +13,8 @@ class App extends React.Component { } render() { - const theme = this.props.route.theme; - const appClass = classNames({ - app: true, - light: theme === 'light', - dark: theme === 'dark' - }); return ( -
+
{this.state.isMounted && !window.devToolsExtension && process.env.NODE_ENV === 'development' && } {this.props.children}
@@ -31,10 +23,7 @@ class App extends React.Component { } App.propTypes = { - children: PropTypes.object, - route: PropTypes.shape({ - theme: PropTypes.string.isRequired - }).isRequired + children: PropTypes.object }; export default connect()(App); diff --git a/client/modules/IDE/pages/IDEView.js b/client/modules/IDE/pages/IDEView.js index 1db87882..3f1eaaf3 100644 --- a/client/modules/IDE/pages/IDEView.js +++ b/client/modules/IDE/pages/IDEView.js @@ -27,6 +27,7 @@ import SplitPane from 'react-split-pane'; import Overlay from '../../App/components/Overlay'; import SketchList from '../components/SketchList'; import About from '../components/About'; +import classNames from 'classnames'; class IDEView extends React.Component { constructor(props) { @@ -156,156 +157,163 @@ class IDEView extends React.Component { } render() { + let ideClass = classNames({ + ide: true, + light: this.props.preferences.theme === 'light', + dark: this.props.preferences.theme === 'dark', + }); return ( -
- {this.props.toast.isVisible && } -