Skip to content

Commit e5bbb53

Browse files
committed
🚧 create alternate content wrapper for proper top padding
1 parent 49a9fe7 commit e5bbb53

File tree

3 files changed

+49
-7
lines changed

3 files changed

+49
-7
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
import styled from 'styled-components';
3+
import { remSize } from '../../theme';
4+
5+
export default styled.div`
6+
z-index: 0;
7+
margin-top: ${remSize(16)};
8+
`;

client/modules/IDE/pages/IDEViewMobile.jsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,10 @@ import IconButton from '../../../components/mobile/IconButton';
3030
import Header from '../../../components/mobile/Header';
3131
import Screen from '../../../components/mobile/MobileScreen';
3232
import Footer from '../../../components/mobile/Footer';
33+
import IDEWrapper from '../../../components/mobile/IDEWrapper';
3334

3435
const textColor = prop('primaryTextColor');
3536

36-
const Content = styled.div`
37-
z-index: 0;
38-
margin-top: ${remSize(16)};
39-
`;
40-
4137
const Icon = styled.a`
4238
> svg {
4339
fill: ${textColor};
@@ -86,7 +82,7 @@ const IDEViewMobile = (props) => {
8682
</div>
8783
</Header>
8884

89-
<Content>
85+
<IDEWrapper>
9086
<Editor
9187
lintWarning={preferences.lintWarning}
9288
linewrap={preferences.linewrap}
@@ -121,7 +117,7 @@ const IDEViewMobile = (props) => {
121117
runtimeErrorWarningVisible={ide.runtimeErrorWarningVisible}
122118
provideController={setTmController}
123119
/>
124-
</Content>
120+
</IDEWrapper>
125121
<Footer><h2>Bottom Bar</h2></Footer>
126122
</Screen>
127123
);

client/modules/Mobile/MobileSketchView.jsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@ import { Link } from 'react-router';
33
import styled from 'styled-components';
44
import Header from '../../components/mobile/Header';
55
import Screen from '../../components/mobile/MobileScreen';
6+
67
import { ExitIcon } from '../../common/Icons';
8+
import { remSize } from '../../theme';
9+
10+
11+
const Content = styled.div`
12+
z-index: 0;
13+
margin-top: ${remSize(48)};
14+
`;
715

816
const IconLinkWrapper = styled(Link)`
917
width: 2rem;
1018
margin-right: 1.25rem;
1119
margin-left: none;
1220
`;
1321

22+
1423
const MobileSketchView = (props) => {
1524
const [overlay, setOverlay] = useState(null);
1625
return (
@@ -33,6 +42,35 @@ const MobileSketchView = (props) => {
3342
</IconButton>
3443
</div> */}
3544
</Header>
45+
<Content>
46+
<h1>Hello</h1>
47+
</Content>
3648
</Screen>);
3749
};
50+
51+
3852
export default MobileSketchView;
53+
54+
55+
// <PreviewFrame
56+
// htmlFile={this.props.htmlFile}
57+
// jsFiles={this.props.jsFiles}
58+
// cssFiles={this.props.cssFiles}
59+
// files={this.props.files}
60+
// head={
61+
// <link type="text/css" rel="stylesheet" href="/preview-styles.css" />
62+
// }
63+
// fullView
64+
// isPlaying
65+
// isAccessibleOutputPlaying={false}
66+
// textOutput={false}
67+
// gridOutput={false}
68+
// soundOutput={false}
69+
// dispatchConsoleEvent={this.ident}
70+
// endSketchRefresh={this.ident}
71+
// previewIsRefreshing={false}
72+
// setBlobUrl={this.ident}
73+
// stopSketch={this.ident}
74+
// expandConsole={this.ident}
75+
// clearConsole={this.ident}
76+
// />

0 commit comments

Comments
 (0)