Skip to content

Commit 161bd78

Browse files
committed
fix(login): add SafeAreaView and update color
1 parent 5bdd37e commit 161bd78

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/auth/screens/login.screen.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Button, Icon } from 'react-native-elements';
88
import Swiper from 'react-native-swiper';
99
import queryString from 'query-string';
1010
import CookieManager from 'react-native-cookies';
11+
import { SafeAreaView } from 'react-navigation';
1112

1213
import { ViewContainer, ErrorScreen } from 'components';
1314
import { colors, fonts, normalize } from 'config';
@@ -42,8 +43,17 @@ const Modal = styled.Modal`
4243

4344
const ModalWrapper = styled.View`
4445
flex: 1;
45-
padding-top: 20;
46-
background-color: #1f2327;
46+
background-color: ${colors.githubDark}
47+
`;
48+
49+
// https://github.com/facebook/react-native/issues/9090
50+
const StyledSafeAreaView = styled(SafeAreaView).attrs({
51+
forceInset: Platform.select({
52+
ios: { top: 'always', bottom: 'never' },
53+
android: {},
54+
}),
55+
})`
56+
background-color: ${colors.githubDark};
4757
`;
4858

4959
const Slide = styled.View`
@@ -342,6 +352,7 @@ class Login extends Component {
342352
visible={this.state.modalVisible}
343353
>
344354
<ModalWrapper>
355+
<StyledSafeAreaView />
345356
<BrowserSection>
346357
<WebView
347358
source={{

src/config/colors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const colors = {
2929
lightPurple: '#bf54eb',
3030
purple: '#8e44ad',
3131
orange: '#e67e22',
32-
githubDark: '#1f2327',
32+
githubDark: '#24292e',
3333
alabaster: '#f7f7f7',
3434
topicLightBlue: '#f1f8ff',
3535
};

0 commit comments

Comments
 (0)