forked from vergnet/application-amicale
		
	Improved dashboard items placement
This commit is contained in:
		
							parent
							
								
									c37e052aa2
								
							
						
					
					
						commit
						dc57cbd7bd
					
				
					 2 changed files with 11 additions and 3 deletions
				
			
		|  | @ -30,11 +30,12 @@ class ActionsDashBoardItem extends React.Component<Props> { | ||||||
|                     description={"VOTRE COMPTE"} |                     description={"VOTRE COMPTE"} | ||||||
|                     left={props => <Avatar.Image |                     left={props => <Avatar.Image | ||||||
|                         {...props} |                         {...props} | ||||||
|                         size={54} |                         size={40} | ||||||
|                         source={ICON_AMICALE} |                         source={ICON_AMICALE} | ||||||
|                         style={styles.avatar}/>} |                         style={styles.avatar}/>} | ||||||
|                     right={props => <List.Icon {...props} icon="chevron-right"/>} |                     right={props => <List.Icon {...props} icon="chevron-right"/>} | ||||||
|                     onPress={() => this.props.navigation.navigate("amicale-home")} |                     onPress={() => this.props.navigation.navigate("amicale-home")} | ||||||
|  |                     style={styles.list} | ||||||
|                 /> |                 /> | ||||||
|                 <List.Item |                 <List.Item | ||||||
|                     title={"STUDENT WEBSITES"} |                     title={"STUDENT WEBSITES"} | ||||||
|  | @ -42,6 +43,7 @@ class ActionsDashBoardItem extends React.Component<Props> { | ||||||
|                     left={props => <List.Icon {...props} icon="web"/>} |                     left={props => <List.Icon {...props} icon="web"/>} | ||||||
|                     right={props => <List.Icon {...props} icon="chevron-right"/>} |                     right={props => <List.Icon {...props} icon="chevron-right"/>} | ||||||
|                     onPress={() => this.props.navigation.navigate("websites-home")} |                     onPress={() => this.props.navigation.navigate("websites-home")} | ||||||
|  |                     style={styles.list} | ||||||
|                 /> |                 /> | ||||||
|                 <List.Item |                 <List.Item | ||||||
|                     title={"SERVICES INSA"} |                     title={"SERVICES INSA"} | ||||||
|  | @ -49,6 +51,7 @@ class ActionsDashBoardItem extends React.Component<Props> { | ||||||
|                     left={props => <List.Icon {...props} icon="star"/>} |                     left={props => <List.Icon {...props} icon="star"/>} | ||||||
|                     right={props => <List.Icon {...props} icon="chevron-right"/>} |                     right={props => <List.Icon {...props} icon="chevron-right"/>} | ||||||
|                     onPress={() => this.props.navigation.navigate("insa-home")} |                     onPress={() => this.props.navigation.navigate("insa-home")} | ||||||
|  |                     style={styles.list} | ||||||
|                 /> |                 /> | ||||||
|             </Card> |             </Card> | ||||||
|         ); |         ); | ||||||
|  | @ -61,12 +64,16 @@ const styles = StyleSheet.create({ | ||||||
|         marginLeft: 10, |         marginLeft: 10, | ||||||
|         marginRight: 10, |         marginRight: 10, | ||||||
|         marginTop: 10, |         marginTop: 10, | ||||||
|         elevation: 4, |  | ||||||
|         borderWidth: 1, |         borderWidth: 1, | ||||||
|     }, |     }, | ||||||
|     avatar: { |     avatar: { | ||||||
|         backgroundColor: 'transparent' |         backgroundColor: 'transparent' | ||||||
|     }, |     }, | ||||||
|  |     list: { | ||||||
|  |         // height: 50,
 | ||||||
|  |         paddingTop:0, | ||||||
|  |         paddingBottom:0, | ||||||
|  |     } | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| export default withTheme(ActionsDashBoardItem); | export default withTheme(ActionsDashBoardItem); | ||||||
|  |  | ||||||
|  | @ -202,6 +202,7 @@ class HomeScreen extends React.Component<Props> { | ||||||
|      */ |      */ | ||||||
|     generateDashboardDataset(dashboardData: fullDashboard): Array<dashboardItem> { |     generateDashboardDataset(dashboardData: fullDashboard): Array<dashboardItem> { | ||||||
|         return [ |         return [ | ||||||
|  |             {id: 'actions', content: []}, | ||||||
|             { |             { | ||||||
|                 id: 'top', |                 id: 'top', | ||||||
|                 content: [ |                 content: [ | ||||||
|  | @ -247,7 +248,6 @@ class HomeScreen extends React.Component<Props> { | ||||||
|                     }, |                     }, | ||||||
|                 ] |                 ] | ||||||
|             }, |             }, | ||||||
|             {id: 'actions', content: []}, |  | ||||||
|             { |             { | ||||||
|                 id: 'event', |                 id: 'event', | ||||||
|                 content: dashboardData.today_events |                 content: dashboardData.today_events | ||||||
|  | @ -445,6 +445,7 @@ class HomeScreen extends React.Component<Props> { | ||||||
|                 contentContainerStyle={{ |                 contentContainerStyle={{ | ||||||
|                     marginLeft: 'auto', |                     marginLeft: 'auto', | ||||||
|                     marginRight: 'auto', |                     marginRight: 'auto', | ||||||
|  |                     marginTop: 5, | ||||||
|                 }} |                 }} | ||||||
|             />); |             />); | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue