You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

120 lines
3.2 KiB

import React from "react";
import { View, Text, Dimensions, Image, Appearance } from "react-native";
import {connect} from 'react-redux';
//style
import tw from "tailwind-rn";
import fontSize from "../../../constants/fontSize";
import Colors from "../../../constants/Colors";
import _ from "lodash";
const width = Dimensions.get("window").width;
function Book({ book, mobile }) {
const colorScheme = Appearance.getColorScheme();
return (
<View
style={[
tw("w-full flex flex-row-reverse justify-between py-3"),
{
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
},
]}
>
<View style={tw("flex flex-row-reverse items-center flex-1")}>
<Image
source={book}
style={[
tw("rounded-md"),
{
width: mobile ? width / 5 : width / 8,
height: (mobile ? width / 5 : width / 8) * (4 / 2.8),
},
]}
/>
<View style={tw("flex flex-col items-end mr-2")}>
<Text
style={[
{
fontSize: mobile ? fontSize.base : fontSize.xl2,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
علوم اجتماعی
</Text>
<Text
style={[
tw(" mt-2"),
{
fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].gray20 + "aa",
fontFamily: "regular",
},
]}
>
پایه دوم
</Text>
<Text
style={[
tw(" mt-1"),
{
fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].greenBA,
fontFamily: "regular",
},
]}
>
نسخه دیجیتال
</Text>
</View>
</View>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
tw(" py-1 px-3 rounded-sm"),
{
color: "#132F52",
fontSize: mobile ? fontSize.xl : fontSize.xl4,
backgroundColor: "#F1F1F1",
fontFamily: "bold",
},
]}
>
1
</Text>
<View style={tw("flex flex-row items-center")}>
<Text
style={{
fontFamily: "bold",
fontSize: mobile ? fontSize.sm : fontSize.xl2,
color: Colors.theme1[colorScheme].green79,
}}
>
تومان
</Text>
<Text
style={[
tw(" mr-3"),
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl,
fontFamily: "bold",
},
]}
>
126.000
</Text>
</View>
</View>
</View>
);
}
const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile
})
export default connect(mapStateToProps)(Book);