Skip to content

Commit 0c7f713

Browse files
committed
console BEM style
1 parent 6b672d2 commit 0c7f713

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

client/modules/IDE/components/Console.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Console extends React.Component {
2525
const args = nextProps.consoleEvent.arguments;
2626
const method = nextProps.consoleEvent.method;
2727
const nextChild = (
28-
<div key={this.children.length} className={method}>
28+
<div key={this.children.length} className={`preview-console__${method}`}>
2929
{Object.keys(args).map((key) => <span key={`${this.children.length}-${key}`}>{args[key]}</span>)}
3030
</div>
3131
);

client/styles/abstracts/_variables.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ $dark-button-active-color: $white;
3939
$ide-border-color: #f4f4f4;
4040
$editor-selected-line-color: #f3f3f3;
4141
$input-border-color: #979797;
42+
43+
$console-warn-color: #ffbe05;
44+
$console-error-color: #ff5f52;

client/styles/components/_console.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
height:60px;
55
right:0px;
66
bottom: 0px;
7-
background:grey;
7+
background:$dark-background-color;
88
z-index:1000;
99

1010
& > {
@@ -13,15 +13,15 @@
1313
}
1414

1515
// assign styles to different types of console messages
16-
.log {
17-
color: black;
16+
.preview-console__log {
17+
color: $dark-secondary-text-color;
1818
}
1919

20-
.error {
21-
color: red;
20+
.preview-console__error {
21+
color: $console-error-color;
2222
}
2323

24-
.warn {
25-
color: yellow;
24+
.preview-console__warn {
25+
color: $console-warn-color;
2626
}
2727
}

0 commit comments

Comments
 (0)