diff --git a/components/Carbon.js b/components/Carbon.js index a2cae3c..1b37df9 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -12,7 +12,8 @@ import { LANGUAGE_MODE_HASH, LANGUAGE_NAME_HASH, LANGUAGE_MIME_HASH, - DEFAULT_SETTINGS + DEFAULT_SETTINGS, + THEMES_HASH } from '../lib/constants' const Watermark = dynamic(() => import('./svg/Watermark'), { @@ -92,6 +93,8 @@ class Carbon extends React.PureComponent { (this.props.config.backgroundImage && this.props.config.backgroundImageSelection) || this.props.config.backgroundImage + const themeConfig = THEMES_HASH[config.theme] + const content = (
{config.windowControls ? ( @@ -99,7 +102,7 @@ class Carbon extends React.PureComponent { theme={config.windowTheme} code={this.props.children} copyable={this.props.copyable} - light={this.props.theme.light} + light={themeConfig.light} /> ) : null} - {config.watermark && } + {config.watermark && }
diff --git a/components/Editor.js b/components/Editor.js index d98749f..f150c30 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -370,7 +370,6 @@ class Editor extends React.Component { key={language} ref={this.carbonNode} config={this.state} - theme={theme} onChange={this.updateCode} loading={this.state.loading} >