page détail ajout différentes zone

brancheRedux
Maxence LANONE 2 years ago
parent 95458454c2
commit 4f1eb2d026

@ -1,16 +1,37 @@
import { useState } from 'react';
import { FlatList, Button, StyleSheet, Text, View, TextInput, Image } from 'react-native';
import { FlatList, Button, StyleSheet, Text, View, TextInput, Image, ScrollView, TabBarIOSItem } from 'react-native';
import { City, Weather, CITIES_DATA, FAVORITE_CITY_DATA, getCurrentWeather } from '../../data/stub';
import CityListItem from '../components/CityListItem';
import { Ionicons, AntDesign } from '@expo/vector-icons';
export default function DetailCity({ route }) {
const weather = route.params.weather;
return (
<View style={styles.container}>
<Text>{weather.temperature}</Text>
<View style={styles.temperature}>
<Text style={styles.weatherText}>{weather.city.name}</Text>
<Text style={styles.temperatureText}>{weather.temperature} °</Text>
</View>
<View style={styles.nexttemp}>
<View style={{flexDirection:"row"}}>
<AntDesign name="clockcircleo" size={15} />
<Text style={{ fontSize: 15 }}>HOURLY FORECAST</Text>
</View>
</View>
<View style={styles.nextdays}>
<View style={{flexDirection:"row"}}>
<AntDesign name="calendar" size={15} />
<Text style={{ fontSize: 15 }}>10-DAY FORECAST</Text>
</View>
</View>
</View>
);
}
@ -18,30 +39,51 @@ export default function DetailCity({route}) {
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
justifyContent: 'space-between',
alignItems: 'center',
height: '100%',
width: '100%',
},
temperature: {
flexDirection: 'column',
justifyContent: 'flex-start',
alignItems: 'center',
borderRadius: 10,
margin: 10,
},
textInput: {
width: "90%"
nexttemp: {
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'flex-start',
height: 130,
borderRadius: 10,
margin: 10,
width: '90%',
backgroundColor: 'rgba(223,223,223,1)',
paddingLeft: "3%",
paddingTop: "3%",
},
searchBar: {
nextdays: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
borderWidth: 0.5,
borderColor: '#000',
height: 40,
justifyContent: 'flex-start',
alignItems: 'flex-start',
height: "50%",
borderRadius: 10,
margin: 10,
width: '90%',
backgroundColor: 'rgba(223,223,223,1)',
marginBottom: 100,
paddingLeft: "3%",
paddingTop: "3%",
},
imageLoupe: {
padding: 10,
margin: 5,
height: 15,
width: 15,
resizeMode: 'stretch',
alignItems: 'center',
weatherText: {
fontSize: 40,
},
temperatureText: {
fontSize: 80,
},
scrollView: {
width: '100%',
padding: 0,
}
});

Loading…
Cancel
Save