Skip to content

Commit 11adfbf

Browse files
committed
🚧 add button to return to main view
1 parent fb831f5 commit 11adfbf

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

client/modules/IDE/pages/IDEViewMobile.jsx

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,54 @@ import { getHTMLFile } from '../reducers/files';
2121
// Local Imports
2222
import Editor from '../components/Editor';
2323
import { prop, remSize } from '../../../theme';
24-
24+
import CloseIcon from '../../../images/exit.svg';
2525

2626
const background = prop('Button.default.background');
2727
const textColor = prop('primaryTextColor');
2828

29+
2930
const Header = styled.div`
3031
position: fixed;
3132
width: 100%;
32-
background-color: ${background};
33+
background: ${background};
3334
color: ${textColor};
3435
padding: ${remSize(12)};
3536
padding-left: ${remSize(32)};
37+
padding-right: ${remSize(32)};
3638
z-index: 1;
39+
40+
display: flex;
41+
flex: 1;
42+
flex-direction: row;
43+
// justify-content: space-between;
44+
align-items: center;
3745
`;
3846

3947
const Footer = styled.div`
40-
width: 100%;
4148
position: fixed;
42-
bottom: 0;
49+
width: 100%;
4350
background: ${background};
4451
color: ${textColor};
52+
padding: ${remSize(12)};
4553
padding-left: ${remSize(32)};
54+
z-index: 1;
55+
56+
bottom: 0;
4657
`;
4758

4859
const Content = styled.div`
4960
z-index: 0;
5061
margin-top: ${remSize(16)};
5162
`;
5263

64+
const Icon = styled.a`
65+
> svg {
66+
fill: ${textColor};
67+
color: ${textColor};
68+
margin: 8px
69+
}
70+
`;
71+
5372

5473
const Screen = ({ children }) => (
5574
<div className="fullscreen-preview">
@@ -71,9 +90,13 @@ const IDEViewMobile = (props) => {
7190
return (
7291
<Screen>
7392
<Header>
74-
{/* <h1>Mobile View</h1> */}
75-
<h2>{project.name}</h2>
76-
<h3>{selectedFile.name}</h3>
93+
<div>
94+
<h2>{project.name}</h2>
95+
<h3>{selectedFile.name}</h3>
96+
</div>
97+
<Icon href="/">
98+
<CloseIcon focusable="false" aria-hidden="true" />
99+
</Icon>
77100
</Header>
78101
{/* <div>
79102
{ [preferences, ide, editorAccessibility, project, updateLintMessage, clearLintMessage, selectedFile, updateFileContent, files, closeEditorOptions, showEditorOptions, showKeyboardShortcutModal, setUnsavedChanges, startRefreshSketch, stopSketch, expandSidebar, collapseSidebar, clearConsole, console, showRuntimeErrorWarning, hideRuntimeErrorWarning]
@@ -116,7 +139,7 @@ const IDEViewMobile = (props) => {
116139
provideController={setTmController}
117140
/>
118141
</Content>
119-
<Footer><h1>Bottom Bar</h1></Footer>
142+
<Footer><h2>Bottom Bar</h2></Footer>
120143
</Screen>
121144
);
122145
};

0 commit comments

Comments
 (0)