You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
17 KiB
1 line
17 KiB
{"ast":null,"code":"import React from \"react\";\nimport View from \"react-native-web/dist/exports/View\";\nimport Text from \"react-native-web/dist/exports/Text\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport TouchableHighlight from \"react-native-web/dist/exports/TouchableHighlight\";\nimport Image from \"react-native-web/dist/exports/Image\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function Details(props) {\n var weather = props.weather;\n var city = weather.city;\n return _jsxs(View, {\n style: {\n alignItems: \"center\",\n backgroundColor: \"darksalmon\",\n height: \"100%\",\n width: \"100%\"\n },\n children: [_jsx(Text, {\n style: styles.name,\n children: city.name\n }), _jsx(View, {\n style: styles.place,\n children: _jsxs(Text, {\n style: styles.petitText,\n children: [city.longitude, \" - \", city.latitude]\n })\n }), _jsx(TouchableHighlight, {\n children: _jsx(Image, {\n style: styles.image,\n source: (weather == null ? void 0 : weather.weatherType) == \"Nuageux\" ? require(\"../assets/Nuageux.png\") : require(\"../assets/Nuageux.png\")\n })\n }), _jsx(Text, {\n style: styles.weatherType,\n children: weather == null ? void 0 : weather.weatherType\n }), _jsxs(View, {\n style: styles.supertruc,\n children: [_jsx(Image, {\n style: styles.petitImage,\n source: require(\"../assets/temperature.png\")\n }), _jsxs(View, {\n style: styles.supertrucencore,\n children: [_jsxs(Text, {\n style: styles.temperature,\n children: [weather == null ? void 0 : weather.temperature, \"\\xB0C\"]\n }), _jsxs(Text, {\n style: styles.petitTemp,\n children: [\"Ressenti \", weather == null ? void 0 : weather.temperatureFeelsLike, \"\\xB0C\"]\n })]\n })]\n }), _jsxs(View, {\n style: styles.boxes,\n children: [_jsxs(View, {\n style: styles.leftBox,\n children: [_jsxs(View, {\n style: styles.imageEtTexte,\n children: [_jsx(Image, {\n style: styles.imageHumidity,\n source: require(\"../assets/humidity.png\")\n }), _jsx(Text, {\n style: styles.text,\n children: \"HUMIDITY\"\n })]\n }), _jsxs(Text, {\n style: styles.humidityText,\n children: [weather == null ? void 0 : weather.humidity, \"%\"]\n })]\n }), _jsxs(View, {\n style: styles.rightBox,\n children: [_jsxs(View, {\n style: styles.imageEtTexte,\n children: [_jsx(Image, {\n style: styles.imageHumidity,\n source: require(\"../assets/wind.png\")\n }), _jsx(Text, {\n style: styles.text,\n children: \"WIND SPEED\"\n })]\n }), _jsxs(Text, {\n style: styles.humidityText,\n children: [weather == null ? void 0 : weather.windSpeed, \" km/h\"]\n })]\n })]\n }), _jsxs(View, {\n style: styles.boxes,\n children: [_jsxs(View, {\n style: styles.leftBox,\n children: [_jsxs(View, {\n style: styles.imageEtTexte,\n children: [_jsx(Image, {\n style: styles.imageHumidity,\n source: require(\"../assets/pressure.png\")\n }), _jsx(Text, {\n style: styles.text,\n children: \"PRESSURE\"\n })]\n }), _jsxs(Text, {\n style: styles.humidityText,\n children: [weather == null ? void 0 : weather.pressure, \" hPa\"]\n })]\n }), _jsxs(View, {\n style: styles.rightBox,\n children: [_jsxs(View, {\n style: styles.imageEtTexte,\n children: [_jsx(Image, {\n style: styles.imageHumidity,\n source: require(\"../assets/visibility.png\")\n }), _jsx(Text, {\n style: styles.text,\n children: \"VISIBILITY\"\n })]\n }), _jsxs(Text, {\n style: styles.humidityText,\n children: [weather == null ? void 0 : weather.visibility, \" km\"]\n })]\n })]\n })]\n });\n}\nvar styles = StyleSheet.create({\n name: {\n marginTop: 30,\n fontSize: 35,\n fontWeight: \"bold\"\n },\n place: {\n marginBottom: 20\n },\n petitText: {\n fontSize: 15\n },\n image: {\n height: 100,\n width: 100\n },\n title: {\n fontWeight: \"bold\",\n fontSize: 18\n },\n temperature: {\n marginTop: 10,\n fontSize: 25,\n fontWeight: \"600\"\n },\n petitTemp: {\n fontSize: 16,\n marginBottom: 35\n },\n weatherType: {\n fontSize: 17,\n marginBottom: 20\n },\n button: {\n height: 30,\n width: 30,\n marginTop: 13,\n alignSelf: \"flex-end\",\n margin: 5\n },\n supertruc: {\n flexDirection: \"row\"\n },\n supertrucencore: {\n flexDirection: \"column\"\n },\n petitImage: {\n height: 40,\n width: 40,\n marginRight: 7,\n marginTop: 15\n },\n imageHumidity: {\n height: 20,\n width: 20,\n marginLeft: 10\n },\n leftBox: {\n alignSelf: \"flex-start\",\n margin: 25,\n marginTop: 10,\n marginBottom: 5,\n height: 90,\n width: 150,\n flexDirection: \"column\",\n backgroundColor: \"powderblue\",\n borderRadius: 20\n },\n rightBox: {\n alignSelf: \"flex-start\",\n marginRight: 25,\n marginTop: 10,\n marginBottom: 5,\n height: 90,\n width: 150,\n flexDirection: \"column\",\n backgroundColor: \"powderblue\",\n borderRadius: 20\n },\n humidityText: {\n marginTop: 13,\n fontWeight: \"bold\",\n fontSize: 20,\n alignSelf: \"center\"\n },\n text: {\n fontWeight: \"normal\",\n fontStyle: 'italic',\n fontSize: 10,\n alignSelf: \"center\",\n marginLeft: 7\n },\n imageEtTexte: {\n flexDirection: \"row\",\n marginTop: 13\n },\n boxes: {\n flexDirection: \"row\"\n }\n});","map":{"version":3,"names":["React","Details","props","weather","city","alignItems","backgroundColor","height","width","styles","name","place","petitText","longitude","latitude","image","weatherType","require","supertruc","petitImage","supertrucencore","temperature","petitTemp","temperatureFeelsLike","boxes","leftBox","imageEtTexte","imageHumidity","text","humidityText","humidity","rightBox","windSpeed","pressure","visibility","StyleSheet","create","marginTop","fontSize","fontWeight","marginBottom","title","button","alignSelf","margin","flexDirection","marginRight","marginLeft","borderRadius","fontStyle"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/components/Details.tsx"],"sourcesContent":["import React from \"react\"\nimport { useSafeAreaInsets } from \"react-native-safe-area-context\";\nimport { View, Text, StyleSheet, TouchableHighlight, Image } from \"react-native\";\nimport { City, Weather } from \"../data/stub\";\n\n\ntype CityProps = {\n weather: Weather,\n}\n\nexport function Details(props: CityProps){\n\n\n const weather: Weather = props.weather\n const city = weather.city\n\n return (\n <View style={{alignItems: \"center\", backgroundColor: \"darksalmon\", height: \"100%\", width: \"100%\"}}>\n <Text style={styles.name}>{city.name}</Text>\n <View style={styles.place}>\n <Text style={styles.petitText}>{city.longitude} - {city.latitude}</Text>\n </View>\n <TouchableHighlight>\n <Image style={styles.image} source={ weather?.weatherType==\"Nuageux\" ? require('../assets/Nuageux.png') : require('../assets/Nuageux.png')}/>\n </TouchableHighlight>\n <Text style={styles.weatherType}>{weather?.weatherType}</Text>\n <View style={styles.supertruc}>\n <Image style={styles.petitImage} source={require('../assets/temperature.png')}/>\n <View style={styles.supertrucencore}>\n <Text style={styles.temperature}>{weather?.temperature}°C</Text>\n <Text style={styles.petitTemp}>Ressenti {weather?.temperatureFeelsLike}°C</Text>\n </View>\n </View>\n <View style={styles.boxes}>\n <View style={styles.leftBox}>\n <View style={styles.imageEtTexte}>\n <Image style={styles.imageHumidity} source={require('../assets/humidity.png')}/>\n <Text style={styles.text}>HUMIDITY</Text>\n </View>\n <Text style={styles.humidityText}>{weather?.humidity}%</Text>\n </View>\n <View style={styles.rightBox}>\n <View style={styles.imageEtTexte}>\n <Image style={styles.imageHumidity} source={require('../assets/wind.png')}/>\n <Text style={styles.text}>WIND SPEED</Text>\n </View>\n <Text style={styles.humidityText}>{weather?.windSpeed} km/h</Text>\n </View>\n </View>\n <View style={styles.boxes}>\n <View style={styles.leftBox}>\n <View style={styles.imageEtTexte}>\n <Image style={styles.imageHumidity} source={require('../assets/pressure.png')}/>\n <Text style={styles.text}>PRESSURE</Text>\n </View>\n <Text style={styles.humidityText}>{weather?.pressure} hPa</Text>\n </View>\n <View style={styles.rightBox}>\n <View style={styles.imageEtTexte}>\n <Image style={styles.imageHumidity} source={require('../assets/visibility.png')}/>\n <Text style={styles.text}>VISIBILITY</Text>\n </View>\n <Text style={styles.humidityText}>{weather?.visibility} km</Text>\n </View>\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n name: {\n marginTop: 30,\n fontSize: 35,\n fontWeight: \"bold\"\n },\n place: {\n marginBottom: 20,\n },\n petitText: {\n fontSize: 15\n },\n image: {\n height: 100,\n width: 100\n },\n title: {\n fontWeight: \"bold\",\n fontSize: 18\n },\n temperature: {\n marginTop: 10,\n fontSize: 25, \n fontWeight: \"600\"\n },\n petitTemp: {\n fontSize: 16,\n marginBottom: 35\n },\n weatherType: {\n fontSize: 17,\n marginBottom: 20\n },\n button: {\n height: 30,\n width: 30,\n marginTop: 13,\n alignSelf: \"flex-end\",\n margin: 5\n },\n supertruc: {\n flexDirection: \"row\"\n },\n supertrucencore: {\n flexDirection: \"column\"\n },\n petitImage: {\n height: 40,\n width: 40,\n marginRight: 7,\n marginTop: 15\n },\n imageHumidity: {\n height: 20,\n width: 20,\n marginLeft: 10\n },\n leftBox: {\n alignSelf: \"flex-start\",\n margin: 25,\n marginTop: 10,\n marginBottom: 5,\n height: 90,\n width: 150,\n flexDirection: \"column\",\n backgroundColor: \"powderblue\",\n borderRadius: 20\n },\n rightBox: {\n alignSelf: \"flex-start\",\n marginRight: 25,\n marginTop: 10,\n marginBottom: 5,\n height: 90,\n width: 150,\n flexDirection: \"column\",\n backgroundColor: \"powderblue\",\n borderRadius: 20\n },\n humidityText: {\n marginTop: 13,\n fontWeight: \"bold\",\n fontSize: 20,\n alignSelf: \"center\"\n },\n text: {\n fontWeight: \"normal\",\n fontStyle: 'italic',\n fontSize: 10,\n alignSelf: \"center\",\n marginLeft: 7\n },\n imageEtTexte: {\n flexDirection: \"row\",\n marginTop: 13\n },\n boxes: {\n flexDirection: \"row\"\n }\n });\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUzB,OAAO,SAASC,OAAO,CAACC,KAAgB,EAAC;EAGrC,IAAMC,OAAgB,GAAGD,KAAK,CAACC,OAAO;EACtC,IAAMC,IAAI,GAAGD,OAAO,CAACC,IAAI;EAEzB,OACI,MAAC,IAAI;IAAC,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