|
|
|
@ -2,6 +2,7 @@ import {StyleSheet, Text, View, FlatList, Image} from 'react-native';
|
|
|
|
|
import {SampleJoke} from "../model/SampleJoke";
|
|
|
|
|
import {CustomJoke} from "../model/CustomJoke";
|
|
|
|
|
import {darksalmonColor, whiteColor, greyColor, indigoColor} from "../assets/Theme";
|
|
|
|
|
import {Colors} from "react-native/Libraries/NewAppScreen";
|
|
|
|
|
|
|
|
|
|
type JokeListItemProps = {
|
|
|
|
|
jokes: CustomJoke[] | SampleJoke[];
|
|
|
|
@ -13,10 +14,10 @@ export default function JokeListItem(props: JokeListItemProps) {
|
|
|
|
|
<View style={styles.color}/>
|
|
|
|
|
<Image source={{ uri: item.image }} style={styles.image} />
|
|
|
|
|
<View style={styles.columnContainer}>
|
|
|
|
|
<Text style={styles.text}>{item.id}</Text>
|
|
|
|
|
<Text style={styles.text}>Résumé de la blague</Text>
|
|
|
|
|
<Text style={styles.text}>{item.description()}</Text>
|
|
|
|
|
<View style={styles.bottomContainer}>
|
|
|
|
|
<Text style={styles.text}>{item.type}</Text>
|
|
|
|
|
<Text style={{color:'white'}}>{item.type}</Text>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
@ -67,11 +68,14 @@ const styles = StyleSheet.create({
|
|
|
|
|
color:whiteColor,
|
|
|
|
|
paddingBottom: 7,
|
|
|
|
|
paddingTop: 7,
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
},
|
|
|
|
|
bottomContainer: {
|
|
|
|
|
backgroundColor: greyColor,
|
|
|
|
|
width:"auto",
|
|
|
|
|
height: 15,
|
|
|
|
|
borderRadius: 5
|
|
|
|
|
paddingVertical: 5,
|
|
|
|
|
paddingHorizontal: 10,
|
|
|
|
|
borderRadius: 20,
|
|
|
|
|
width : 150,
|
|
|
|
|
alignItems : 'center'
|
|
|
|
|
}
|
|
|
|
|
});
|