reza fixed compo colors before Profile

master
Reza_ashrafi 2 years ago
parent d800583931
commit c6567f7385
  1. 27
      src/screens/Products/components/Main.js

@ -4,7 +4,6 @@ import {
Pressable,
Image,
Dimensions,
Appearance,
Platform,
} from "react-native";
import React from "react";
@ -19,9 +18,8 @@ import fontSize from "../../../constants/fontSize";
const ios = Platform.OS === "ios";
const Main = ({ books, filterOptions, grades, mobile }) => {
const Main = ({ books, filterOptions, grades, mobile, theme }) => {
const [width, setWidth] = React.useState(Dimensions.get("window").width);
const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation();
const [filterLoading, setFilterLoading] = React.useState(false);
@ -77,7 +75,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
{
width: mobile ? "auto" : width / 2.2,
borderWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
borderColor: Colors.theme1[theme].grayE3,
},
tw(`flex mb-5 p-2 rounded-md ${mobile ? "w-full" : ""}`),
]}
@ -102,7 +100,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
{
fontFamily: "bold",
fontSize: fontSize.lg,
color: Colors.theme1[colorScheme].gray20,
color: Colors.theme1[theme].gray20,
textAlign: ios ? "right" : "auto",
},
]}
@ -115,7 +113,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
{
fontSize: fontSize.tiny,
fontFamily: "regular",
color: Colors.theme1[colorScheme].greenBA,
color: Colors.theme1[theme].greenBA,
textAlign: ios ? "right" : "auto",
},
]}
@ -145,7 +143,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
width: mobile ? width / 2 - 25 : width / 3.2,
marginBottom: 15,
borderWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
borderColor: Colors.theme1[theme].grayE3,
},
tw("flex justify-between px-2 pt-2 rounded-md"),
]}
@ -186,7 +184,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
</Text>
<Text
style={{
color: Colors.theme1[colorScheme].greenBA,
color: Colors.theme1[theme].greenBA,
fontSize: fontSize.tiny,
marginTop: 5,
fontFamily: "regular",
@ -206,7 +204,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
style={[
tw("text-center ml-1"),
{
color: Colors.theme1[colorScheme].gray20,
color: Colors.theme1[theme].gray20,
fontFamily: "bold",
fontSize: fontSize.xl2,
},
@ -217,7 +215,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
<Text
style={{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].gray2077,
color: Colors.theme1[theme].gray2077,
fontFamily: "regular",
}}
>
@ -236,7 +234,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
width: mobile ? width / 2 - 25 : width / 3.2,
marginBottom: 15,
borderWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
borderColor: Colors.theme1[theme].grayE3,
},
tw("flex justify-between px-2 pt-2 rounded-md"),
]}
@ -277,7 +275,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
</Text>
<Text
style={{
color: Colors.theme1[colorScheme].greenBA,
color: Colors.theme1[theme].greenBA,
fontSize: fontSize.tiny,
marginTop: 5,
fontFamily: "regular",
@ -297,7 +295,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
style={[
tw("text-center ml-1"),
{
color: Colors.theme1[colorScheme].gray20,
color: Colors.theme1[theme].gray20,
fontFamily: "bold",
fontSize: fontSize.xl2,
},
@ -308,7 +306,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
<Text
style={{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].gray2077,
color: Colors.theme1[theme].gray2077,
fontFamily: "regular",
}}
>
@ -348,6 +346,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
const mapStateToProps = (state) => ({
filterOptions: state.book.filterOptions,
mobile: state.publicApi.mobile,
theme: state.publicApi.theme
});
const mapDispatchToProps = {};

Loading…
Cancel
Save