Skip to content

Commit 639903c

Browse files
committed
fixed containerStyle propTypes
1 parent b8a10ba commit 639903c

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

components/Profile1/Email.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ const Email = ({ containerStyle, onPressEmail, name, email, index }) => (
6969
)
7070

7171
Email.propTypes = {
72-
containerStyle: PropTypes.objectOf(
73-
PropTypes.oneOfType([PropTypes.string, PropTypes.number])
74-
),
72+
containerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
7573
email: PropTypes.string.isRequired,
7674
index: PropTypes.string.isRequired,
7775
name: PropTypes.string,

components/Profile1/Tel.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ const Tel = ({
9494
}
9595

9696
Tel.propTypes = {
97-
containerStyle: PropTypes.objectOf(
98-
PropTypes.oneOfType([PropTypes.string, PropTypes.number])
99-
),
97+
containerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
10098
index: PropTypes.string.isRequired,
10199
name: PropTypes.string,
102100
number: PropTypes.string.isRequired,

components/Profile2/Profile.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Posts from './Posts'
2121

2222
const styles = StyleSheet.create({
2323
cardContainer: {
24-
backgroundColor: '#fff',
24+
backgroundColor: '#FFF',
2525
borderWidth: 0,
2626
flex: 1,
2727
margin: 0,
@@ -32,7 +32,7 @@ const styles = StyleSheet.create({
3232
},
3333
headerContainer: {
3434
alignItems: 'center',
35-
backgroundColor: '#fff',
35+
backgroundColor: '#FFF',
3636
marginBottom: 10,
3737
marginTop: 45,
3838
},
@@ -50,7 +50,7 @@ const styles = StyleSheet.create({
5050
flexDirection: 'row',
5151
},
5252
tabBar: {
53-
backgroundColor: '#EEEFEE',
53+
backgroundColor: '#EEE',
5454
},
5555
tabContainer: {
5656
flex: 1,
@@ -104,8 +104,11 @@ class Profile2 extends Component {
104104
avatar: PropTypes.string.isRequired,
105105
name: PropTypes.string.isRequired,
106106
bio: PropTypes.string.isRequired,
107-
containerStyle: PropTypes.object,
108-
tabContainerStyle: PropTypes.object,
107+
containerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
108+
tabContainerStyle: PropTypes.oneOfType([
109+
PropTypes.object,
110+
PropTypes.number,
111+
]),
109112
posts: PropTypes.arrayOf(
110113
PropTypes.shape({
111114
id: PropTypes.number.isRequired,

0 commit comments

Comments
 (0)