diff --git a/embark-ui/src/components/FileExplorer.js b/embark-ui/src/components/FileExplorer.js index 4bf73d6d..e93bca9e 100644 --- a/embark-ui/src/components/FileExplorer.js +++ b/embark-ui/src/components/FileExplorer.js @@ -4,15 +4,18 @@ import React from 'react'; import PropTypes from 'prop-types'; import {Treebeard, decorators} from 'react-treebeard'; import classNames from 'classnames'; +import {DARK_THEME} from '../constants' -const style = { +const isDarkTheme= (theme) => theme === DARK_THEME; + +const style = (theme) => ({ tree: { base: { height: '450px', overflowX: 'auto', listStyle: 'none', - backgroundColor: '#1C1C1C', - color: '#ffffff', + backgroundColor: isDarkTheme(theme) ? '#1C1C1C' : '#FFFFFF', + color: isDarkTheme(theme) ? '#FFFFFF' : '#000000', padding: '10px 0 0 10px', margin: 0, }, @@ -38,7 +41,7 @@ const style = { height: 7, width: 7, arrow: { - fill: '#FFFFFF', + fill: isDarkTheme(theme) ? '#FFFFFF' : '#000000', strokeWidth: 0 } }, @@ -68,7 +71,7 @@ const style = { } } } -}; +}); const Header = ({style, node}) => { @@ -212,7 +215,7 @@ class FileExplorer extends React.Component { data={this.data(this.props.files)} decorators={decorators} onToggle={this.onToggle.bind(this)} - style={style} + style={style(this.props.theme)} />