Skip to content

Commit 94ad8be

Browse files
authored
Merge pull request #41 from co2-git/feature/40
Fix #40
2 parents 788f708 + a029447 commit 94ad8be

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

app/components/App/App.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,39 @@ import {connect} from 'react-redux';
33
import React from 'react';
44
import SwipeableViews from 'react-swipeable-views';
55

6+
import {appMainStyle, appTabStyle, appTopBarStyle} from '../../styles/main';
7+
import AndroidHome from '../Android/Home';
68
import AppBar from './AppBar';
79
import AppBottomBar from './AppBottomBar';
810
import Info from '../ReactNative/Info';
911
import Page from '../Layout/Page';
10-
import AndroidHome from '../Android/Home';
1112

1213
const App = ({app, index}: $AppProps) => (
1314
<Page style={{display: 'flex', flexDirection: 'column'}}>
14-
<div style={{flexShrink: 0}}>
15+
<div style={appTopBarStyle}>
1516
<AppBar app={app} />
1617
</div>
17-
<div style={{flexGrow: 2, overflow: 'auto'}}>
18+
<div style={appMainStyle}>
1819
<SwipeableViews index={index}>
19-
<div>
20+
<div style={appTabStyle}>
2021
<Info app={app} />
2122
</div>
22-
<div>
23+
<div style={appTabStyle}>
2324
Start
2425
</div>
25-
<div>
26+
<div style={appTabStyle}>
2627
<AndroidHome app={app} />
2728
</div>
28-
<div>
29+
<div style={appTabStyle}>
2930
iOS
3031
</div>
31-
<div>
32+
<div style={appTabStyle}>
3233
Upgrade
3334
</div>
34-
<div>
35+
<div style={appTabStyle}>
3536
Native
3637
</div>
37-
<div>
38+
<div style={appTabStyle}>
3839
Eject
3940
</div>
4041
</SwipeableViews>

app/styles/main.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ export const lightInfoMessage = {
3636
marginLeft: adjustWithCard,
3737
marginRight: adjustWithCard,
3838
};
39+
40+
export const appTopBarStyle = {
41+
flexShrink: 0,
42+
};
43+
44+
export const appMainStyle = {
45+
flexGrow: 2,
46+
overflow: 'hidden',
47+
boxSizing: 'border-box',
48+
};
49+
50+
export const appTabStyle = {
51+
overflow: 'auto',
52+
boxSizing: 'border-box',
53+
height: 'calc(100vh - 120px)',
54+
};

0 commit comments

Comments
 (0)