1
1
import React from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import styled from 'styled-components' ;
4
- // import { Link } from 'react-router';
4
+ import { Link } from 'react-router' ;
5
5
import { connect } from 'react-redux' ;
6
6
import { withRouter } from 'react-router' ;
7
7
import { useState } from 'react' ;
@@ -21,10 +21,12 @@ import { getHTMLFile } from '../reducers/files';
21
21
// Local Imports
22
22
import Editor from '../components/Editor' ;
23
23
import { prop , remSize } from '../../../theme' ;
24
- import CloseIcon from '../../../images/exit.svg' ;
24
+ import { CloseIcon } from '../../../common/Icons' ;
25
+
25
26
import PreferencesIcon from '../../../images/preferences.svg' ;
26
27
import PlayIcon from '../../../images/triangle-arrow-right.svg' ;
27
28
29
+
28
30
const background = prop ( 'Button.default.background' ) ;
29
31
const textColor = prop ( 'primaryTextColor' ) ;
30
32
@@ -42,7 +44,7 @@ const Header = styled.div`
42
44
display: flex;
43
45
flex: 1;
44
46
flex-direction: row;
45
- // justify-content: space-between ;
47
+ justify-content: flex-start ;
46
48
align-items: center;
47
49
` ;
48
50
@@ -63,12 +65,11 @@ const Content = styled.div`
63
65
margin-top: ${ remSize ( 16 ) } ;
64
66
` ;
65
67
66
- const Icon = styled . a `
68
+ const IconButton = styled . button `
69
+ width: 3rem;
67
70
> svg {
68
- fill: ${ textColor } ;
69
- color: ${ textColor } ;
70
- margin-left: ${ remSize ( 16 ) } ;
71
- align-items: center;
71
+ width: 100%;
72
+ height: auto;
72
73
}
73
74
` ;
74
75
@@ -95,26 +96,23 @@ const IDEViewMobile = (props) => {
95
96
return (
96
97
< Screen >
97
98
< Header >
99
+ < Link to = "/" style = { { width : '3rem' , marginRight : '1.25rem' } } >
100
+ < CloseIcon viewBox = "20 21 60 60" aria-hidden = "true" aria-label = "close header" />
101
+ </ Link >
98
102
< div >
99
103
< h2 > { project . name } </ h2 >
100
104
< h3 > { selectedFile . name } </ h3 >
101
105
</ div >
102
- < div >
103
- < Icon href = "/" >
104
- < CloseIcon focusable = "false" aria-hidden = "true" />
105
- </ Icon >
106
- < Icon onClick = { ( ) => setOverlay ( 'preferences' ) } >
106
+
107
+ < div style = { { marginLeft : '2rem' } } >
108
+ < IconButton onClick = { ( ) => setOverlay ( 'preferences' ) } >
107
109
< PreferencesIcon focusable = "false" aria-hidden = "true" />
108
- </ Icon >
109
- < Icon onClick = { ( ) => setOverlay ( 'runSketch' ) } >
110
- < PlayIcon focusable = "false" aria-hidden = "true" />
111
- </ Icon >
110
+ </ IconButton >
111
+ < IconButton onClick = { ( ) => setOverlay ( 'runSketch' ) } >
112
+ < PlayIcon viewBox = "-1 -1 7 7" focusable = "false" aria-hidden = "true" />
113
+ </ IconButton >
112
114
</ div >
113
115
</ Header >
114
- { /* <div>
115
- { [preferences, ide, editorAccessibility, project, updateLintMessage, clearLintMessage, selectedFile, updateFileContent, files, closeEditorOptions, showEditorOptions, showKeyboardShortcutModal, setUnsavedChanges, startRefreshSketch, stopSketch, expandSidebar, collapseSidebar, clearConsole, console, showRuntimeErrorWarning, hideRuntimeErrorWarning]
116
- .map(pr => <h5>{pr.toString()}</h5>) }
117
- </div> */ }
118
116
119
117
< Content >
120
118
< Editor
0 commit comments