diff --git a/src/assets/img/arrow-left-1.svg b/src/assets/img/arrow-left-1.svg new file mode 100644 index 0000000..ff23f10 --- /dev/null +++ b/src/assets/img/arrow-left-1.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Calendar/index.css b/src/components/Calendar/index.css index 2f6a530..8f9802d 100644 --- a/src/components/Calendar/index.css +++ b/src/components/Calendar/index.css @@ -10,17 +10,18 @@ .DatePicker__input { background: #fff; - border: 1px solid rgba(0, 0, 0, 0.4); - padding: 0.6em 1.2em; + border: 1px solid #e0e0e0; + padding:1em 1.2em; /* font-family:'iranSans'; */ text-align: center; font-size: 12px; border-radius: 7px; + color: #00253a; } .DatePicker__input:focus{ - outline:1px solid #06BACE; - color: #06BACE; + outline:1px solid #1064cd; + color: #1064cd; } .DatePicker__input.-rtl { @@ -28,10 +29,10 @@ } .DatePicker__input::placeholder { - color: #979797; + color: #aaaaaa } .DatePicker__input:focus::placeholder{ - color: #06BACE; + color: #1064cd; } .DatePicker__calendarContainer.-top + .DatePicker__calendarArrow { diff --git a/src/components/RangeDatePicker/index.js b/src/components/RangeDatePicker/index.js new file mode 100644 index 0000000..6d72afb --- /dev/null +++ b/src/components/RangeDatePicker/index.js @@ -0,0 +1,22 @@ +import React, { useState } from "react"; +import DatePicker from "../Calendar/CalendarComponents"; + +const RangeDatePicker = ({title}) => { + const [selectedDayRange, setSelectedDayRange] = useState({ + from: null, + to: null + }); + return ( + + ); + }; + + export default RangeDatePicker; \ No newline at end of file diff --git a/src/view/addProduct/Main/index.js b/src/view/addProduct/Main/index.js index 8802b6e..ac6c5ed 100644 --- a/src/view/addProduct/Main/index.js +++ b/src/view/addProduct/Main/index.js @@ -1,7 +1,9 @@ import React from "react"; import { Editor } from "react-draft-wysiwyg"; import AddPic from "../components/addPic"; +import ProductInfos from "../components/infos"; import Metrics from "../components/metrics"; +import Payment from "../components/payment"; import './editor.css'; const MainAP = () => { @@ -23,8 +25,9 @@ const MainAP = () => {
- +
+ ) } diff --git a/src/view/addProduct/components/addPic.js b/src/view/addProduct/components/addPic.js index f78678e..d6b3942 100644 --- a/src/view/addProduct/components/addPic.js +++ b/src/view/addProduct/components/addPic.js @@ -3,11 +3,12 @@ import React, {useState, useEffect} from "react"; const AddPic = () => { const [imageUrl, setImageUrl] = useState([]); const [selectedImage, setSelectedImage] = useState(null); + const [fakeState, setFakeState] = useState(5); useEffect(() => { if (selectedImage) { imageUrl.push(URL.createObjectURL(selectedImage)); - + setFakeState(fakeState + 1) console.log(imageUrl) } @@ -29,7 +30,7 @@ const AddPic = () => {
{ imageUrl.slice(1,imageUrl.length).map((item, index) => ( - + )) } diff --git a/src/view/addProduct/components/infos.js b/src/view/addProduct/components/infos.js new file mode 100644 index 0000000..0ee5fce --- /dev/null +++ b/src/view/addProduct/components/infos.js @@ -0,0 +1,65 @@ +import React, { useState, useEffect } from "react"; +import Checkbox from "../../../components/Checkbox"; +import arrow from '../../../assets/img/arrow-left-1.svg'; +import RangeDatePicker from "../../../components/RangeDatePicker"; + +const ProductInfos = () => { + const type = [ + { + id: 0, + title: 'لطفا نوع محصول را مشخص کنید' + }, + { + id: 1, + title: 'ساده' + }, + { + id: 2, + title: 'متغیر' + }, + { + id: 3, + title: 'الکترونیکی' + }, + { + id: 4, + title: 'لورم ایپسوم' + }, + ] + const inputs = [ + + ] + return ( +
+

+ اطلاعات محصول +

+
+ + + + + + + + + + +
+
+ +
+ +

آیا امکان پیش فروش این کالا باشد؟

+
+
+ +
+ ) +} + +export default ProductInfos; \ No newline at end of file diff --git a/src/view/addProduct/components/metrics.js b/src/view/addProduct/components/metrics.js index 9493013..afa4c39 100644 --- a/src/view/addProduct/components/metrics.js +++ b/src/view/addProduct/components/metrics.js @@ -12,11 +12,11 @@ const Metrics = () => {

وزن و ابعاد محصول

-
+
{ inputs.map( (item, index) => ( -
+
) diff --git a/src/view/addProduct/components/payment.js b/src/view/addProduct/components/payment.js new file mode 100644 index 0000000..bd44fac --- /dev/null +++ b/src/view/addProduct/components/payment.js @@ -0,0 +1,33 @@ +import React, {useState, useEffect} from "react"; +import Checkbox from "../../../components/Checkbox"; + +const Payment = () => { + const inputs = [ + 'آنلاین', + 'درب محل', + 'کارت به کارت', + 'قسطی', + ] + return( +
+

+ نحوه پرداخت +

+
+ { + inputs.map( + (item, index) => ( +
+ +

{item}

+
+ ) + ) + } +
+ +
+ ) +} + +export default Payment; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index 464beec..f13ab61 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -32,6 +32,7 @@ module.exports = { grayFD : '#fdfdfd', grayE0 : '#e0e0e0', gray81 : '#818181', + gray70 : '#707070', red82OP: 'rgba(223, 20, 82, 0.08)', pinkF5: '#fff1f5', pinkD6 : '#ffd6d6',