Commit 5bb75b8e by Giang Tran

edit item

parent 17764246
......@@ -27,12 +27,19 @@ const Item = (props) => {
<Image source={R.images.iconRecharge} style={styles.imgIcon} />
</View>
<Block padding={[5, 10]} space={'between'} flex={1}>
<View style={{justifyContent: 'center', flex: 1}}>
<View
style={{
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
}}>
<Text numberOfLines={2} style={styles.txtBlack}>
{item.body}
Ngô CBOT
</Text>
<Text style={styles.txtMoney}>05/2022</Text>
</View>
<Text style={styles.txt}>{item.pushed_at}</Text>
<Text style={styles.txtCode}>Mã hp đồng:ZCEK22</Text>
<Text style={styles.txt}>29/04/2022-13/05/2022</Text>
</Block>
</Block>
</TouchableOpacity>
......@@ -75,9 +82,12 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
},
txt: {
fontSize: getFontXD(39),
color: '#929292',
fontStyle: 'italic',
fontSize: getFontXD(36),
},
txtCode: {
fontSize: getFontXD(36),
color: R.colors.main,
marginVertical: 5,
},
rowBet: {
flexDirection: 'row',
......@@ -87,10 +97,15 @@ const styles = StyleSheet.create({
txtBlack: {
fontSize: getFontXD(42),
color: 'black',
fontWeight: 'bold',
},
imgIcon: {
width: WIDTHXD(178),
height: HEIGHTXD(178),
resizeMode: 'contain',
},
txtMoney: {
fontSize: getFontXD(42),
color: R.colors.main,
},
});
......@@ -22,17 +22,22 @@ const Item = (props) => {
<View style={styles.container}>
<TouchableOpacity onPress={() => props.onPress(item)}>
<Block flex={1} row>
<View style={styles.wrapLeft} />
<View style={styles.wrapDate}>
<Image source={R.images.iconRecharge} style={styles.imgIcon} />
</View>
<Block padding={[5, 10]} space={'between'} flex={1}>
<View style={{justifyContent: 'center', flex: 1}}>
<View
style={{
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
}}>
<Text numberOfLines={2} style={styles.txtBlack}>
{item.body}
Ngô CBOT
</Text>
<Text style={styles.txtMoney}>{toPriceVnd(300000)}</Text>
</View>
<Text style={styles.txt}>{item.pushed_at}</Text>
<Text style={styles.txt}>ZCE</Text>
</Block>
</Block>
</TouchableOpacity>
......@@ -87,10 +92,15 @@ const styles = StyleSheet.create({
txtBlack: {
fontSize: getFontXD(42),
color: 'black',
fontWeight: 'bold',
},
imgIcon: {
width: WIDTHXD(178),
height: HEIGHTXD(178),
resizeMode: 'contain',
},
txtMoney: {
fontSize: getFontXD(42),
color: R.colors.main,
},
});
import React from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
Alert,
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
Alert,
} from 'react-native';
import {
getFontXD,
HEIGHTXD,
WIDTHXD,
toPriceVnd,
getFontXD,
HEIGHTXD,
WIDTHXD,
toPriceVnd,
} from '../../../Config/Functions';
import R from '../../../assets/R';
import Block from '../../../components/Block';
const Item = (props) => {
const {item} = props;
return (
<View style={styles.container}>
<TouchableOpacity onPress={()=> props.onPress(item)}>
<Block flex={1} row>
<View style={styles.wrapLeft}/>
<View style={styles.wrapDate}>
<Image source={R.images.iconRecharge} style={styles.imgIcon}/>
</View>
<Block padding={[5, 10]} space={'between'} flex={1}>
<View style={{justifyContent: 'center', flex: 1}}>
<Text numberOfLines={2} style={styles.txtBlack}>
{item.body}
</Text>
</View>
<Text style={styles.txt}>{item.pushed_at}</Text>
</Block>
</Block>
</TouchableOpacity>
</View>
);
const {item} = props;
return (
<View style={styles.container}>
<TouchableOpacity onPress={() => props.onPress(item)}>
<Block flex={1} row>
<View style={styles.wrapDate}>
<Image source={R.images.iconRecharge} style={styles.imgIcon} />
</View>
<Block padding={[5, 10]} space={'between'} flex={1}>
<View
style={{
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
}}>
<Text numberOfLines={2} style={styles.txtBlack}>
Ngô CBOT
</Text>
<Text style={styles.txtMoney}>{toPriceVnd(300000)}</Text>
</View>
<Text style={styles.txt}>ZCE</Text>
</Block>
</Block>
</TouchableOpacity>
</View>
);
};
export default Item;
const styles = StyleSheet.create({
container: {
marginTop: 10,
paddingVertical: 10,
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5,
marginHorizontal: 10,
backgroundColor: R.colors.white,
marginBottom: 10,
borderRadius: HEIGHTXD(30),
container: {
marginTop: 10,
paddingVertical: 10,
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5,
marginHorizontal: 10,
backgroundColor: R.colors.white,
marginBottom: 10,
borderRadius: HEIGHTXD(30),
},
wrapLeft: {
width: WIDTHXD(16),
borderTopLeftRadius: HEIGHTXD(30),
borderBottomStartRadius: HEIGHTXD(30),
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
},
txtTitle: {
fontSize: getFontXD(42),
color: R.colors.black,
fontWeight: 'bold',
},
txt: {
fontSize: getFontXD(39),
color: '#929292',
fontStyle: 'italic',
},
rowBet: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
txtBlack: {
fontSize: getFontXD(42),
color: 'black',
},
imgIcon: {
width: WIDTHXD(178),
height: HEIGHTXD(178),
resizeMode: 'contain',
},
wrapLeft: {
width: WIDTHXD(16),
borderTopLeftRadius: HEIGHTXD(30),
borderBottomStartRadius: HEIGHTXD(30),
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
},
txtTitle: {
fontSize: getFontXD(42),
color: R.colors.black,
fontWeight: 'bold',
},
txt: {
fontSize: getFontXD(39),
color: '#929292',
fontStyle: 'italic',
},
rowBet: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
txtBlack: {
fontSize: getFontXD(42),
color: 'black',
fontWeight: 'bold',
},
imgIcon: {
width: WIDTHXD(178),
height: HEIGHTXD(178),
resizeMode: 'contain',
},
txtMoney: {
fontSize: getFontXD(42),
color: R.colors.main,
},
});
......@@ -27,12 +27,19 @@ const Item = (props) => {
<Image source={R.images.iconRecharge} style={styles.imgIcon} />
</View>
<Block padding={[5, 10]} space={'between'} flex={1}>
<View style={{justifyContent: 'center', flex: 1}}>
<View
style={{
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
}}>
<Text numberOfLines={2} style={styles.txtBlack}>
{item.body}
Ngô CBOT
</Text>
<Text style={styles.txtMoney}>Th 2-Th 6</Text>
</View>
<Text style={styles.txt}>{item.pushed_at}</Text>
<Text style={styles.txt}>Phiên 1: 07:00-19:45</Text>
<Text style={styles.txt}>Phiên 2: 20:30-01:20</Text>
</Block>
</Block>
</TouchableOpacity>
......@@ -75,9 +82,7 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
},
txt: {
fontSize: getFontXD(39),
color: '#929292',
fontStyle: 'italic',
fontSize: getFontXD(36),
},
rowBet: {
flexDirection: 'row',
......@@ -87,10 +92,15 @@ const styles = StyleSheet.create({
txtBlack: {
fontSize: getFontXD(42),
color: 'black',
fontWeight: 'bold',
},
imgIcon: {
width: WIDTHXD(178),
height: HEIGHTXD(178),
resizeMode: 'contain',
},
txtMoney: {
fontSize: getFontXD(42),
color: R.colors.main,
},
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment