ADD: Ajout de la vue liste au component Skin

stub-api
Alban GUILHOT 3 years ago
parent ac07d0673e
commit c5d38f26b7

@ -27,7 +27,7 @@ FC<{skin: Skin, state: String}> =
<Text style={styles.nomSkin}>100</Text>
</Pressable>
)
case 'profile':
case 'liste':
return(
<Pressable onPress={() => Alert.alert("Achat du skin")} style={styles.imageWrapper}>
<Text style={styles.nomSkin}>{skin.getSkinName()}</Text>
@ -37,6 +37,16 @@ FC<{skin: Skin, state: String}> =
/>
</Pressable>
)
case 'profile':
return(
<Pressable onPress={() => Alert.alert("Achat du skin")} style={styles.imageWrapperProfil}>
<Text style={styles.nomSkin}>{skin.getSkinName()}</Text>
<Image
style={styles.imageSkin}
source={skin.getSkinSource()}
/>
</Pressable>
)
default:
break;
}

@ -1,27 +1,32 @@
import { StyleSheet } from "react-native";
export default StyleSheet.create({
icon: {
width: 50,
height: 50,
borderRadius: 50,
},
imageWrapper: {
height: 135,
width: '40%',
flexDirection: "column",
margin: 10,
},
imageSkin : {
borderRadius: 15,
width: '100%',
flex:1
},
nomSkin :{
textAlign: 'center',
fontSize: 25,
fontFamily: 'Helvetica',
fontWeight: 'bold',
color: 'white',
},
icon: {
width: 50,
height: 50,
borderRadius: 50,
},
imageWrapper: {
height: 135,
width: '40%',
flexDirection: "column",
margin: 10,
},
imageWrapperProfil: {
height: 135,
flexDirection: "column",
margin: 10,
},
imageSkin : {
borderRadius: 15,
width: '100%',
flex:1
},
nomSkin :{
textAlign: 'center',
fontSize: 25,
fontFamily: 'Helvetica',
fontWeight: 'bold',
color: 'white',
},
});
Loading…
Cancel
Save