Merge branch 'console' of git://github.com/therewasaguy/p5.js-web-editor into therewasaguy-console

This commit is contained in:
catarak 2016-07-20 20:33:10 -04:00
commit 4e38d8468c
3 changed files with 11 additions and 8 deletions

View file

@ -25,7 +25,7 @@ class Console extends React.Component {
const args = nextProps.consoleEvent.arguments; const args = nextProps.consoleEvent.arguments;
const method = nextProps.consoleEvent.method; const method = nextProps.consoleEvent.method;
const nextChild = ( const nextChild = (
<div key={this.children.length} className={method}> <div key={this.children.length} className={`preview-console__${method}`}>
{Object.keys(args).map((key) => <span key={`${this.children.length}-${key}`}>{args[key]}</span>)} {Object.keys(args).map((key) => <span key={`${this.children.length}-${key}`}>{args[key]}</span>)}
</div> </div>
); );

View file

@ -39,3 +39,6 @@ $dark-button-active-color: $white;
$ide-border-color: #f4f4f4; $ide-border-color: #f4f4f4;
$editor-selected-line-color: #f3f3f3; $editor-selected-line-color: #f3f3f3;
$input-border-color: #979797; $input-border-color: #979797;
$console-warn-color: #ffbe05;
$console-error-color: #ff5f52;

View file

@ -4,7 +4,7 @@
height:60px; height:60px;
right:0px; right:0px;
bottom: 0px; bottom: 0px;
background:grey; background:$dark-background-color;
z-index:1000; z-index:1000;
& > { & > {
@ -13,15 +13,15 @@
} }
// assign styles to different types of console messages // assign styles to different types of console messages
.log { .preview-console__log {
color: black; color: $dark-secondary-text-color;
} }
.error { .preview-console__error {
color: red; color: $console-error-color;
} }
.warn { .preview-console__warn {
color: yellow; color: $console-warn-color;
} }
} }