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

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