CLEANUP: move style from screens to screens.style

stub-api
Alban GUILHOT 3 years ago
parent 275075fd5c
commit 5f33fc4ea4

@ -16,7 +16,7 @@ function Chat(props: { navigation: any; }) {
skin={skinTest}
nav={navigation}
/>
<View style={styles.body}>
<View style={stylesScreen.bodyStart}>
<Text >couille</Text>
</View>
<BotBar
@ -27,13 +27,4 @@ function Chat(props: { navigation: any; }) {
);
}
const styles = StyleSheet.create({
body: {
flex: 1,
flexDirection: 'column',
alignItems: 'flex-start',
width: '70%',
},
});
export default Chat

@ -27,7 +27,7 @@ function Home(props: { navigation: any; }) {
skin={UserActu.getCurrentSkin()}
nav={navigation}
/>
<View style={styles.body}>
<View style={stylesScreen.bodyCenter}>
<ButtonGameTypeChoice
title='Jouer Seul'
onPress={() => navigation.navigate('GameChoice')}
@ -45,13 +45,4 @@ function Home(props: { navigation: any; }) {
);
}
const styles = StyleSheet.create({
body: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
width: '70%',
},
});
export default Home

@ -13,20 +13,12 @@ function Store(props: { navigation: any; }) {
nav={navigation}
state='settings'
/>
<View style={styles.body}>
<View style={stylesScreen.bodyStart}>
<Text>couille</Text>
</View>
</View>
);
}
const styles = StyleSheet.create({
body: {
flex: 1,
flexDirection: 'column',
alignItems: 'flex-start',
width: '70%',
},
});
export default Store

@ -8,6 +8,7 @@ import { BotBar } from '../components/BotBar';
import { FlatList } from 'react-native-gesture-handler';
import { SkinComponent } from '../components/Skin';
import tabSkinApp from '../constSkin';
import { ScreenIndicator } from '../components/ScreenIndicator';
function SkinList(props: { navigation: any; }) {
@ -18,13 +19,14 @@ function SkinList(props: { navigation: any; }) {
skin={tabSkinApp[0]}
nav={navigation}
/>
<View style={styles.body}>
<View style={stylesScreen.bodyStart}>
<ScreenIndicator title='Mes Skins'/>
<FlatList
data={tabSkinApp}
numColumns={2}
columnWrapperStyle={{ flex: 1, justifyContent: "space-around"}}
keyExtractor={item =>item.getSkinName()}
renderItem={({item}) => <SkinComponent skin={item} state='profile'/>} />
renderItem={({item}) => <SkinComponent skin={item} state='liste'/>} />
</View>
<BotBar
nav={navigation}
@ -33,12 +35,4 @@ function SkinList(props: { navigation: any; }) {
);
}
const styles = StyleSheet.create({
body: {
flex: 1,
flexDirection: 'column',
width: '100%',
},
});
export default SkinList

@ -8,7 +8,7 @@ import { BotBar } from '../components/BotBar';
import { FlatList } from 'react-native-gesture-handler';
import { SkinComponent } from '../components/Skin';
import { ElementAffichage } from '../components/Element';
import { ScreenIndicator } from '../components/ScreenIndicator';
import tabSkinApp from '../constSkin';
function Store(props: { navigation: any; }) {
@ -19,7 +19,8 @@ function Store(props: { navigation: any; }) {
skin={tabSkinApp[0]}
nav={navigation}
/>
<View style={styles.body}>
<View style={stylesScreen.bodyStart}>
<ScreenIndicator title='Store'/>
<FlatList
data={tabSkinApp}
numColumns={2}
@ -35,28 +36,4 @@ function Store(props: { navigation: any; }) {
);
}
const styles = StyleSheet.create({
body: {
flex: 1,
flexDirection: 'column',
width: '100%',
},
imageSkin : {
borderRadius: 15,
marginTop: 15,
marginRight: 15,
width: 100,
height: 100,
},
nomSkin :{
textAlign: 'center',
fontSize: 15,
fontFamily: 'Helvetica',
fontWeight: 'bold',
letterSpacing: 0.25,
color: 'white',
},
});
export default Store

@ -8,4 +8,15 @@ export default StyleSheet.create({
justifyContent: "flex-start",
alignItems: "center",
},
bodyStart: {
flex: 1,
flexDirection: 'column',
width: '100%',
},
bodyCenter: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
width: '100%',
},
});
Loading…
Cancel
Save