fermeture auto + composant selectChantier
This commit is contained in:
@@ -1,32 +1,41 @@
|
||||
import ChantierSummary from '@/components/chantierSummary';
|
||||
import SelectChantier from '@/components/selectChantier';
|
||||
import SetStatus from '@/components/setStatus';
|
||||
import { ThemedView, } from '@/components/themed-view';
|
||||
import Constants from 'expo-constants'; //pour connaître la taille de la barre menu de l'OS en haut
|
||||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { useChantier } from '../ContextChantier';
|
||||
|
||||
|
||||
|
||||
|
||||
export default function Home() {
|
||||
|
||||
const { chantier, setChantier } = useChantier();
|
||||
|
||||
|
||||
return(
|
||||
<ThemedView lvl={3} style={styles.container}>
|
||||
|
||||
<View style={{width:"100%", position: 'absolute',marginLeft:"50%"}}>
|
||||
<SetStatus></SetStatus>
|
||||
</View>
|
||||
<View style={{width:"100%", position: 'absolute'}}>
|
||||
<SelectChantier></SelectChantier>
|
||||
</View>
|
||||
|
||||
<ThemedView lvl={3} style={styles.back}>
|
||||
<View style={styles.container}>
|
||||
|
||||
<View style={{width:"100%", position: 'absolute',marginLeft:"50%"}}>
|
||||
<SetStatus></SetStatus>
|
||||
</View>
|
||||
<View style={{width:"100%", position: 'absolute'}}>
|
||||
<SelectChantier></SelectChantier>
|
||||
</View>
|
||||
<ChantierSummary style={styles.summary} data={{chantier}}/>
|
||||
|
||||
</View>
|
||||
</ThemedView>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
back:{
|
||||
height:"100%",
|
||||
width:"100%",
|
||||
},
|
||||
container: {
|
||||
flex: 1,
|
||||
marginTop: Constants.statusBarHeight, //pour la barre menu du haut
|
||||
@@ -35,4 +44,8 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
width:"100%"
|
||||
},
|
||||
summary:{
|
||||
marginTop:60,
|
||||
padding:10,
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user