File tree Expand file tree Collapse file tree 7 files changed +65
-36
lines changed Expand file tree Collapse file tree 7 files changed +65
-36
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
3
3
var Isvg = require ( 'react-inlinesvg' ) ;
4
- var preferences = require ( '../../../images/preferences .svg' ) ;
4
+ var exitUrl = require ( '../../../images/exit .svg' ) ;
5
5
var classNames = require ( 'classnames' ) ;
6
6
7
7
class Preferences extends React . Component {
@@ -11,9 +11,9 @@ class Preferences extends React.Component {
11
11
"preferences--selected" : this . props . isPreferencesShowing
12
12
} ) ;
13
13
return (
14
- < div className = { preferencesContainerClass } >
14
+ < div className = { preferencesContainerClass } tabindex = "0" >
15
15
< button className = "preferences__exit-button" onClick = { this . props . closePreferences } >
16
- X
16
+ < Isvg src = { exitUrl } alt = "Exit Preferences" />
17
17
</ button >
18
18
</ div >
19
19
) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ class App extends React.Component {
20
20
openPreferences = { this . props . openPreferences }
21
21
isPreferencesShowing = { this . props . preferences . isPreferencesShowing }
22
22
/>
23
+ < Preferences
24
+ isPreferencesShowing = { this . props . preferences . isPreferencesShowing }
25
+ closePreferences = { this . props . closePreferences } />
23
26
< Editor
24
27
content = { this . props . file . content }
25
28
updateFile = { this . props . updateFile } />
@@ -29,9 +32,6 @@ class App extends React.Component {
29
32
< link type = 'text/css' rel = 'stylesheet' href = 'preview-styles.css' />
30
33
}
31
34
isPlaying = { this . props . ide . isPlaying } />
32
- < Preferences
33
- isPreferencesShowing = { this . props . preferences . isPreferencesShowing }
34
- closePreferences = { this . props . closePreferences } />
35
35
</ div >
36
36
) ;
37
37
}
Original file line number Diff line number Diff line change 1
- %toolbar-button {
2
- background-color : $light-button-background-color ;
3
- color : $light-button-color ;
1
+ %button {
4
2
display : inline-block ;
5
3
height : #{44 / $base-font-size } rem;
6
4
width : #{44 / $base-font-size } rem;
10
8
cursor : pointer ;
11
9
border : none ;
12
10
outline : none ;
11
+ }
13
12
13
+ %toolbar-button {
14
+ @extend %button ;
15
+ background-color : $light-button-background-color ;
16
+ color : $light-button-color ;
14
17
& g {
15
18
fill : $light-toolbar-button-color ;
16
19
}
17
-
18
20
& :hover {
19
21
background-color : $light-button-background-hover-color ;
20
22
color : $light-button-hover-color ;
30
32
}
31
33
}
32
34
}
35
+
36
+ %preferences-button {
37
+ @extend %button ;
38
+ background-color : $light-preferences-button-background-color ;
39
+ & g {
40
+ fill : $light-preferences-button-color ;
41
+ }
42
+ & :hover {
43
+ background-color : $light-preferences-button-background-color ;
44
+
45
+ & g {
46
+ fill : $light-preferences-button-hover-color ;
47
+ }
48
+ }
49
+ }
Original file line number Diff line number Diff line change @@ -35,4 +35,9 @@ $dark-button-active-color: $white;
35
35
$editor-border-color : #f4f4f4 ;
36
36
$editor-selected-line-color : #f3f3f3 ;
37
37
38
- $preferences-background-color : #f4f4f4 ;
38
+ $light-preferences-background-color : #f4f4f4 ;
39
+
40
+ $light-preferences-button-color : #8e8e8f ;
41
+ $light-preferences-button-hover-color : #333333 ;
42
+
43
+ $light-preferences-button-background-color : #e6e6e6 ;
Original file line number Diff line number Diff line change 1
1
.preferences {
2
- background-color : $preferences-background-color ;
2
+ background-color : $light- preferences-background-color ;
3
3
display : none ;
4
4
& --selected {
5
5
display : flex ;
6
6
}
7
7
}
8
8
9
9
.preferences__exit-button {
10
- background-color : $light-button-background-color ;
11
- color : $light-button-color ;
12
- display : inline-block ;
13
- height : #{44 / $base-font-size } rem;
14
- width : #{44 / $base-font-size } rem;
15
- text-align : center ;
16
- line-height : #{50 / $base-font-size } rem;
17
- cursor : pointer ;
18
- border : none ;
19
- outline : none ;
10
+ @extend %preferences-button ;
20
11
margin-left : auto ;
12
+ background-color : $light-preferences-background-color ;
13
+
14
+ & :hover {
15
+ background-color : $light-preferences-background-color ;
16
+ }
21
17
}
You can’t perform that action at this time.
0 commit comments