Skip to content

Commit 83cc981

Browse files
committed
chore(infra): first container
1 parent ebda0f1 commit 83cc981

File tree

3 files changed

+67
-13
lines changed

3 files changed

+67
-13
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import React from 'react'
2+
import styled from 'styled-components/native'
3+
4+
import {
5+
Image,
6+
Platform,
7+
StyleSheet,
8+
Text,
9+
TouchableOpacity,
10+
View,
11+
} from 'react-native'
12+
import { WebBrowser } from 'expo'
13+
14+
import { MonoText } from '../../components/StyledText'
15+
import {
16+
Wrapper,
17+
StyledText2,
18+
ScrollViewWrapper,
19+
StartedWrapper,
20+
} from './styles'
21+
22+
class CommunityBannerContainer extends React.Component {
23+
static navigationOptions = {
24+
header: null,
25+
}
26+
27+
render() {
28+
return (
29+
<Wrapper>
30+
<ScrollViewWrapper>
31+
<StartedWrapper>
32+
<StyledText2>CPS - RN 客户端</StyledText2>
33+
<Text>hello coderplanets</Text>
34+
</StartedWrapper>
35+
</ScrollViewWrapper>
36+
</Wrapper>
37+
)
38+
}
39+
}
40+
41+
export default CommunityBannerContainer
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import styled from 'styled-components/native'
2+
3+
import { ScrollView } from 'react-native'
4+
5+
export const Wrapper = styled.View`
6+
flex: 1;
7+
background-color: #354450;
8+
`
9+
export const StyledText2 = styled.Text`
10+
color: tomato;
11+
font-weight: bold;
12+
`
13+
14+
export const ScrollViewWrapper = styled.ScrollView`
15+
flex: 1;
16+
background-color: #fff;
17+
padding-top: 30;
18+
`
19+
20+
export const StartedWrapper = styled.View`
21+
align-items: center;
22+
margin-horizontal: 50;
23+
`

screens/HomeScreen.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {
1212
} from 'react-native'
1313
import { WebBrowser } from 'expo'
1414

15+
import CommunityBanner from '../containers/CommunityBanner'
16+
1517
import { MonoText } from '../components/StyledText'
1618

1719
export default class HomeScreen extends React.Component {
@@ -37,19 +39,7 @@ export default class HomeScreen extends React.Component {
3739
/>
3840
</View>
3941

40-
<View style={styles.getStartedContainer}>
41-
{this._maybeRenderDevelopmentModeWarning()}
42-
43-
<StyledText>CPS 客户端</StyledText>
44-
45-
<View
46-
style={[styles.codeHighlightContainer, styles.homeScreenFilename]}
47-
>
48-
<MonoText style={styles.codeHighlightText}>
49-
screens/HomeScreen.js
50-
</MonoText>
51-
</View>
52-
</View>
42+
<CommunityBanner />
5343

5444
<View style={styles.helpContainer}>
5545
<TouchableOpacity

0 commit comments

Comments
 (0)