reza fixed compo colors before Product

master
Reza_ashrafi 3 years ago
parent 7457cf1833
commit 27220a735a
  1. 2
      src/screens/Faq/index.js
  2. 19
      src/screens/OrderDetails/components/Book.js
  3. 57
      src/screens/OrderDetails/index.js
  4. 25
      src/screens/OrdersFollowUp/components/Order.js

@ -23,8 +23,6 @@ function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
getFaq(); getFaq();
}, []); }, []);
const onChange = (name, value) => {};
return ( return (
<SafeAreaView <SafeAreaView
style={{ style={{

@ -1,5 +1,5 @@
import React from "react"; import React from "react";
import { View, Text, Dimensions, Image, Appearance } from "react-native"; import { View, Text, Dimensions, Image } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
//style //style
import tw from "tailwind-rn"; import tw from "tailwind-rn";
@ -7,19 +7,17 @@ import fontSize from "../../../constants/fontSize";
import Colors from "../../../constants/Colors"; import Colors from "../../../constants/Colors";
import _ from "lodash"; import _ from "lodash";
import { product } from "../../../redux/actions";
const width = Dimensions.get("window").width; const width = Dimensions.get("window").width;
function Book({ book, mobile, grades }) { function Book({ book, mobile, grades, theme }) {
const colorScheme = Appearance.getColorScheme();
return ( return (
<View <View
style={[ style={[
tw("w-full flex flex-row-reverse justify-between py-3"), tw("w-full flex flex-row-reverse justify-between py-3"),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3, borderColor: Colors.theme1[theme].grayE3,
}, },
]} ]}
> >
@ -42,7 +40,7 @@ function Book({ book, mobile, grades }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.base : fontSize.xl2, fontSize: mobile ? fontSize.base : fontSize.xl2,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -54,7 +52,7 @@ function Book({ book, mobile, grades }) {
tw(" mt-2"), tw(" mt-2"),
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].gray20 + "aa", color: Colors.theme1[theme].gray20 + "aa",
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -66,7 +64,7 @@ function Book({ book, mobile, grades }) {
tw(" mt-1"), tw(" mt-1"),
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].greenBA, color: Colors.theme1[theme].greenBA,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -94,7 +92,7 @@ function Book({ book, mobile, grades }) {
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
fontSize: mobile ? fontSize.sm : fontSize.xl2, fontSize: mobile ? fontSize.sm : fontSize.xl2,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
}} }}
> >
تومان تومان
@ -103,7 +101,7 @@ function Book({ book, mobile, grades }) {
style={[ style={[
tw(" mr-3"), tw(" mr-3"),
{ {
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontSize: fontSize.xl, fontSize: fontSize.xl,
fontFamily: "bold", fontFamily: "bold",
}, },
@ -120,6 +118,7 @@ function Book({ book, mobile, grades }) {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile, mobile: state.publicApi.mobile,
grades: state.publicApi.grades, grades: state.publicApi.grades,
theme: state.publicApi.theme
}); });
export default connect(mapStateToProps)(Book); export default connect(mapStateToProps)(Book);

@ -9,7 +9,6 @@ import {
Platform, Platform,
StatusBar, StatusBar,
LayoutAnimation, LayoutAnimation,
Appearance,
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import _ from "lodash"; import _ from "lodash";
@ -44,10 +43,9 @@ const status = {
2: "ارسال شده", 2: "ارسال شده",
}; };
function OrderDetails({ mobile, route }) { function OrderDetails({ mobile, route, theme }) {
const { order } = route.params;
const colorScheme = Appearance.getColorScheme(); const { order } = route.params;
const [position, setPosition] = useState("100%"); const [position, setPosition] = useState("100%");
const setBoxPosition = () => { const setBoxPosition = () => {
@ -85,14 +83,14 @@ function OrderDetails({ mobile, route }) {
mobile ? "p-3" : "p-4" mobile ? "p-3" : "p-4"
}` }`
), ),
{ backgroundColor: Colors.theme1[colorScheme].greenCF + "1a" }, { backgroundColor: Colors.theme1[theme].greenCF + "1a" },
]} ]}
> >
<View style={tw("flex flex-row-reverse items-center")}> <View style={tw("flex flex-row-reverse items-center")}>
<Text <Text
style={[ style={[
{ {
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontSize: mobile fontSize: mobile
? mobile ? mobile
? fontSize.sm ? fontSize.sm
@ -117,7 +115,7 @@ function OrderDetails({ mobile, route }) {
tw("w-full flex flex-row-reverse items-center py-4"), tw("w-full flex flex-row-reverse items-center py-4"),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3, borderColor: Colors.theme1[theme].grayE3,
}, },
]} ]}
> >
@ -125,7 +123,7 @@ function OrderDetails({ mobile, route }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -138,7 +136,7 @@ function OrderDetails({ mobile, route }) {
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
lineHeight: mobile ? 17 : "auto", lineHeight: mobile ? 17 : "auto",
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -151,7 +149,7 @@ function OrderDetails({ mobile, route }) {
tw("w-full flex flex-row-reverse justify-between py-4"), tw("w-full flex flex-row-reverse justify-between py-4"),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3, borderColor: Colors.theme1[theme].grayE3,
}, },
]} ]}
> >
@ -160,7 +158,7 @@ function OrderDetails({ mobile, route }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -173,7 +171,7 @@ function OrderDetails({ mobile, route }) {
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
lineHeight: mobile ? 17 : "auto", lineHeight: mobile ? 17 : "auto",
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -186,7 +184,7 @@ function OrderDetails({ mobile, route }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -199,7 +197,7 @@ function OrderDetails({ mobile, route }) {
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
lineHeight: mobile ? 17 : "auto", lineHeight: mobile ? 17 : "auto",
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -211,7 +209,7 @@ function OrderDetails({ mobile, route }) {
<View <View
style={[ style={[
tw("w-full rounded-md flex p-4 items-end mt-2"), tw("w-full rounded-md flex p-4 items-end mt-2"),
{ backgroundColor: Colors.theme1[colorScheme].greenFF1 + "aa" }, { backgroundColor: Colors.theme1[theme].greenFF1 + "aa" },
]} ]}
> >
<Text <Text
@ -222,7 +220,7 @@ function OrderDetails({ mobile, route }) {
? fontSize.sm ? fontSize.sm
: fontSize.lg : fontSize.lg
: fontSize.lg, : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -238,7 +236,7 @@ function OrderDetails({ mobile, route }) {
? fontSize.sm ? fontSize.sm
: fontSize.lg : fontSize.lg
: fontSize.lg, : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -257,7 +255,7 @@ function OrderDetails({ mobile, route }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -269,7 +267,7 @@ function OrderDetails({ mobile, route }) {
tw("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -283,7 +281,7 @@ function OrderDetails({ mobile, route }) {
tw("w-full flex flex-row-reverse justify-between py-4"), tw("w-full flex flex-row-reverse justify-between py-4"),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3, borderColor: Colors.theme1[theme].grayE3,
}, },
]} ]}
> >
@ -292,7 +290,7 @@ function OrderDetails({ mobile, route }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -304,7 +302,7 @@ function OrderDetails({ mobile, route }) {
tw("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -317,7 +315,7 @@ function OrderDetails({ mobile, route }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -329,7 +327,7 @@ function OrderDetails({ mobile, route }) {
tw("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -343,7 +341,7 @@ function OrderDetails({ mobile, route }) {
tw("w-full flex flex-row-reverse justify-between py-4"), tw("w-full flex flex-row-reverse justify-between py-4"),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3, borderColor: Colors.theme1[theme].grayE3,
}, },
]} ]}
> >
@ -353,7 +351,7 @@ function OrderDetails({ mobile, route }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -365,7 +363,7 @@ function OrderDetails({ mobile, route }) {
tw("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -380,7 +378,7 @@ function OrderDetails({ mobile, route }) {
style={[ style={[
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -392,7 +390,7 @@ function OrderDetails({ mobile, route }) {
tw("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: "regular", fontFamily: "regular",
}, },
]} ]}
@ -421,6 +419,7 @@ const styles = StyleSheet.create({
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile, mobile: state.publicApi.mobile,
theme: state.publicApi.theme
}); });
export default connect(mapStateToProps)(OrderDetails); export default connect(mapStateToProps)(OrderDetails);

@ -6,7 +6,6 @@ import {
StyleSheet, StyleSheet,
Image, Image,
TouchableOpacity, TouchableOpacity,
Appearance,
} from "react-native"; } from "react-native";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import { connect } from "react-redux"; import { connect } from "react-redux";
@ -35,8 +34,7 @@ const status = {
2: "ارسال شده", 2: "ارسال شده",
}; };
function Order({ order, mobile }) { function Order({ order, mobile, theme }) {
const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation(); const navigation = useNavigation();
return ( return (
@ -45,7 +43,7 @@ function Order({ order, mobile }) {
tw("w-full flex rounded-md overflow-hidden my-3"), tw("w-full flex rounded-md overflow-hidden my-3"),
{ {
borderWidth: 1, borderWidth: 1,
borderColor: Colors.theme1[colorScheme].greenCF + "22", borderColor: Colors.theme1[theme].greenCF + "22",
}, },
]} ]}
> >
@ -56,7 +54,7 @@ function Order({ order, mobile }) {
mobile ? "p-3" : "p-4" mobile ? "p-3" : "p-4"
}` }`
), ),
{ backgroundColor: Colors.theme1[colorScheme].greenCF + "1a" }, { backgroundColor: Colors.theme1[theme].greenCF + "1a" },
]} ]}
> >
<Text <Text
@ -64,7 +62,7 @@ function Order({ order, mobile }) {
tw("font-medium"), tw("font-medium"),
{ {
fontSize: mobile ? fontSize.base : fontSize.xl, fontSize: mobile ? fontSize.base : fontSize.xl,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontFamily: mobile ? "regular" : "demi", fontFamily: mobile ? "regular" : "demi",
}, },
]} ]}
@ -76,7 +74,7 @@ function Order({ order, mobile }) {
style={[ style={[
tw("font-light"), tw("font-light"),
{ {
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
fontFamily: mobile ? "bold" : "demi", fontFamily: mobile ? "bold" : "demi",
}, },
@ -119,7 +117,7 @@ function Order({ order, mobile }) {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
fontFamily: "bold", fontFamily: "bold",
backgroundColor: "#F0FFF1", backgroundColor: "#F0FFF1",
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
}, },
]} ]}
> >
@ -133,7 +131,7 @@ function Order({ order, mobile }) {
tw("my-3"), tw("my-3"),
{ {
fontSize: mobile ? fontSize.tiny : fontSize.xl, fontSize: mobile ? fontSize.tiny : fontSize.xl,
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[theme].gray20,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -148,14 +146,14 @@ function Order({ order, mobile }) {
), ),
{ {
borderWidth: 1, borderWidth: 1,
borderColor: Colors.theme1[colorScheme].greenCF, borderColor: Colors.theme1[theme].greenCF,
}, },
]} ]}
> >
<Text <Text
style={{ style={{
fontSize: mobile ? fontSize.base : fontSize.xl, fontSize: mobile ? fontSize.base : fontSize.xl,
color: Colors.theme1[colorScheme].greenCF, color: Colors.theme1[theme].greenCF,
fontFamily: "regular", fontFamily: "regular",
}} }}
> >
@ -171,7 +169,7 @@ function Order({ order, mobile }) {
<Path <Path
d="M8.988 11.936 5.081 8.03a1.19 1.19 0 0 1 0-1.678l3.907-3.907" d="M8.988 11.936 5.081 8.03a1.19 1.19 0 0 1 0-1.678l3.907-3.907"
fill="none" fill="none"
stroke={Colors.theme1[colorScheme].greenCF} stroke={Colors.theme1[theme].greenCF}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
data-name="vuesax/linear/arrow-left" data-name="vuesax/linear/arrow-left"
@ -183,7 +181,7 @@ function Order({ order, mobile }) {
tw("my-5"), tw("my-5"),
{ {
fontSize: mobile ? fontSize.sm : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[theme].gray20,
fontFamily: "light", fontFamily: "light",
}, },
]} ]}
@ -200,6 +198,7 @@ function Order({ order, mobile }) {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile, mobile: state.publicApi.mobile,
theme: state.publicApi.theme
}); });
export default connect(mapStateToProps)(Order); export default connect(mapStateToProps)(Order);

Loading…
Cancel
Save