them build pc, account
This commit is contained in:
@@ -51,6 +51,34 @@ const ShowProductItem = (props: { id: number, productName: string, productSKU: s
|
||||
);
|
||||
}
|
||||
|
||||
const ShowProductItemSave = (props: { id: number, productName: string, productSKU: string, summary: string, productImage: { small: string, medium: string, large: string, original: string }, price: number, marketPrice: number, quantity: number, privateStyle: object }) => {
|
||||
|
||||
const { id, productName, productSKU, summary, productImage, price, marketPrice, quantity, privateStyle } = props;
|
||||
const discount = Math.ceil(100 - (price / marketPrice * 100));
|
||||
|
||||
|
||||
return (
|
||||
<View style={[styles.itemProduct, privateStyle]}>
|
||||
<TouchableOpacity style={styles.pProductDelete}>
|
||||
<FontAwesome style={styles.pProductDeleteIcon} name="times" />
|
||||
</TouchableOpacity>
|
||||
<View style={styles.pBloxImgProduct}>
|
||||
<Text style={styles.pSkuProduct}>{productSKU}</Text>
|
||||
<Text style={styles.pDiscountProduct}>-{discount}%</Text>
|
||||
<View style={styles.pBloxImgProductBao}>
|
||||
<Image style={styles.pImgProduct} source={{ uri: productImage.large }} />
|
||||
</View>
|
||||
</View>
|
||||
<Text style={styles.pNameProduct} numberOfLines={2}>
|
||||
{productName}
|
||||
</Text>
|
||||
<Text style={styles.pSummaryProduct}>{summary}</Text>
|
||||
<Text style={styles.priceProduct}>{formatCurrency(price)} đ</Text>
|
||||
<Text style={styles.oldPriceProduct}>{formatCurrency(marketPrice)} đ</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const ItemComboSet = (props: { id: number, productName: string, productSKU: string, productImage: { small: string, medium: string, large: string, original: string }, price: number, marketPrice: number, quantity: number }) => {
|
||||
|
||||
const { id, productName, productSKU, productImage, price, marketPrice, quantity } = props;
|
||||
@@ -102,7 +130,7 @@ const ItemComboSetProDetail = (props: { id: number, productName: string, product
|
||||
);
|
||||
}
|
||||
|
||||
export { ShowProductItem, ItemComboSet, ItemComboSetProDetail };
|
||||
export { ShowProductItem, ItemComboSet, ItemComboSetProDetail, ShowProductItemSave };
|
||||
|
||||
let winWidth = Dimensions.get('window').width; //full width
|
||||
let winHeight = Dimensions.get('window').height; //full height
|
||||
@@ -241,5 +269,12 @@ const styles = StyleSheet.create({
|
||||
lineHeight: 22,
|
||||
marginHorizontal: 10
|
||||
},
|
||||
|
||||
pProductDelete: {},
|
||||
pProductDeleteIcon: {
|
||||
fontSize: 18,
|
||||
},
|
||||
pSummaryProduct: {
|
||||
marginBottom: 10,
|
||||
lineHeight: 20,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user