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();
}, []);
const onChange = (name, value) => {};
return (
<SafeAreaView
style={{

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

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

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

Loading…
Cancel
Save