home en cours
This commit is contained in:
@@ -18,9 +18,10 @@ export default function Home() {
|
|||||||
<SetStatus></SetStatus>
|
<SetStatus></SetStatus>
|
||||||
</View>
|
</View>
|
||||||
<View style={{width:"100%", position: 'absolute'}}>
|
<View style={{width:"100%", position: 'absolute'}}>
|
||||||
<SelectChantier></SelectChantier>
|
<SelectChantier></SelectChantier>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
</ThemedView>
|
</ThemedView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -31,6 +32,7 @@ const styles = StyleSheet.create({
|
|||||||
marginTop: Constants.statusBarHeight, //pour la barre menu du haut
|
marginTop: Constants.statusBarHeight, //pour la barre menu du haut
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
flex: 1,
|
||||||
width:"100%"
|
width:"100%"
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
import { useChantier } from '@/app/ContextChantier';
|
import { useChantier } from '@/app/ContextChantier';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Dimensions, LayoutAnimation, Modal, Pressable, StyleSheet, View } from 'react-native';
|
import { Dimensions, LayoutAnimation, Pressable, StyleSheet, View } from 'react-native';
|
||||||
import Animated, { LinearTransition } from 'react-native-reanimated';
|
import Animated, { LinearTransition } from 'react-native-reanimated';
|
||||||
import { ThemedButton } from './themed-button';
|
import { ThemedButton } from './themed-button';
|
||||||
import { ThemedText } from './themed-text';
|
import { ThemedText } from './themed-text';
|
||||||
import { ThemedTextInput } from './themed-textinput';
|
|
||||||
import { ThemedView } from "./themed-view";
|
import { ThemedView } from "./themed-view";
|
||||||
|
|
||||||
const screenHeight = Dimensions.get("window").height;
|
const screenHeight = Dimensions.get("window").height;
|
||||||
|
const { width, height } = Dimensions.get("window");
|
||||||
|
|
||||||
|
|
||||||
export default function SetStatus() {
|
export default function SetStatus() {
|
||||||
@@ -18,9 +17,6 @@ export default function SetStatus() {
|
|||||||
const [isOpen,setIsOpen] = useState(false);
|
const [isOpen,setIsOpen] = useState(false);
|
||||||
|
|
||||||
const AnimatedThemedView = Animated.createAnimatedComponent(ThemedView);
|
const AnimatedThemedView = Animated.createAnimatedComponent(ThemedView);
|
||||||
const AnimatedThemedText = Animated.createAnimatedComponent(ThemedText);
|
|
||||||
const AnimatedThemedButton = Animated.createAnimatedComponent(ThemedButton);
|
|
||||||
const AnimatedThemedTextInput = Animated.createAnimatedComponent(ThemedTextInput);
|
|
||||||
|
|
||||||
const choices = ["En cours","Interrompu","Terminé","Non réalisé"]
|
const choices = ["En cours","Interrompu","Terminé","Non réalisé"]
|
||||||
|
|
||||||
@@ -50,20 +46,7 @@ export default function SetStatus() {
|
|||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<>
|
|
||||||
<Modal
|
|
||||||
visible={isOpen}
|
|
||||||
transparent
|
|
||||||
animationType="none"
|
|
||||||
onRequestClose={() => setIsOpen(false)}
|
|
||||||
>
|
|
||||||
{isOpen && (
|
|
||||||
<Pressable
|
|
||||||
style={styles.overlay}
|
|
||||||
onPress={() => setIsOpen(false)}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Modal>
|
|
||||||
<Animated.View layout={LinearTransition.duration(200)} style={styles.windowBox}>
|
<Animated.View layout={LinearTransition.duration(200)} style={styles.windowBox}>
|
||||||
<AnimatedThemedView layout={LinearTransition.duration(200)} lvl={2} shadow={true} style={styles.window}>
|
<AnimatedThemedView layout={LinearTransition.duration(200)} lvl={2} shadow={true} style={styles.window}>
|
||||||
<ThemedButton style={styles.button} lvl={isOpen ? 1 : 1} onPress={() => onPressOpen()}>
|
<ThemedButton style={styles.button} lvl={isOpen ? 1 : 1} onPress={() => onPressOpen()}>
|
||||||
@@ -81,17 +64,14 @@ export default function SetStatus() {
|
|||||||
}
|
}
|
||||||
</AnimatedThemedView>
|
</AnimatedThemedView>
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
overlay: {
|
|
||||||
...StyleSheet.absoluteFillObject,
|
|
||||||
zIndex: 1,
|
|
||||||
},
|
|
||||||
windowBox:{
|
windowBox:{
|
||||||
|
zIndex: 2,
|
||||||
//backgroundColor: '#00FFFF40',
|
//backgroundColor: '#00FFFF40',
|
||||||
width:"30%",
|
width:"30%",
|
||||||
padding: 10,
|
padding: 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user