Skip to content

Commit

Permalink
Adjusted Avatars Card and children Views (#786)
Browse files Browse the repository at this point in the history
The `height` prop in `Card` component were hiding the second View, limiting the View.
Style props in each child was also spared. This can be chest in the parent View.
This is more simple. I based of [Layout in flexbox](https://facebook.github.io/react-native/docs/flexbox.html)
  • Loading branch information
iRoachie committed Dec 17, 2017
1 parent 66fbbc2 commit 1f689f5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions example/src/views/lists_home.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,19 @@ class Icons extends Component {
containerStyle={{
marginTop: 15,
marginBottom: 15,
height: 230,
paddingLeft: 10,
}}
title="AVATARS"
>
<View style={{margin: 40, flex: 1}}>
<View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>
<View
style={{
flex: 1,
margin: 40,
justifyContent: 'center',
alignItems: 'center',
}}
>
<View style={{ flexDirection: 'row' }}>
<Avatar
small
rounded
Expand Down Expand Up @@ -346,7 +352,7 @@ class Icons extends Component {
activeOpacity={0.7}
/>
</View>
<View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center', marginTop: 80}}>
<View style={{ marginTop: 40, flexDirection: 'row' }}>
<Avatar
medium
rounded
Expand Down

0 comments on commit 1f689f5

Please sign in to comment.