From 8a664b621d159ddc1c62780c2b9f5b1256d069d5 Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Mon, 7 Feb 2022 11:22:35 +0330 Subject: [PATCH] Stepper Fixed + Nav Fixed (position) --- src/components/Stepper/index.js | 83 +++++++++++++++++++++++++++++++++ src/components/nav/Nav.js | 2 +- src/view/register/index.js | 7 ++- 3 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 src/components/Stepper/index.js diff --git a/src/components/Stepper/index.js b/src/components/Stepper/index.js new file mode 100644 index 0000000..62d2125 --- /dev/null +++ b/src/components/Stepper/index.js @@ -0,0 +1,83 @@ +import React, {useState} from "react"; + +function Stepper({ + direction, + activeColor, + deactiveColor, + count, + currentStep, +}) { + const steps = [ + { + title: 'اطلاعات هویتی' + }, + { + title: 'مشخصات والدین' + }, + { + title: 'قوانین و مقررات' + }, + { + title: 'تایید اطلاعات' + }, + ] + return ( +
+ {steps.map((item, index) => ( +
+
+
+ +
+

{item.title}

+
+ {count !== (Number(index) + 1) && ( + + )} +
+ ))} +
+ ); +} + + +export default Stepper; + +Stepper.defaultProps = { + direction: "vertical", + activeColor: "#df1452", + deactiveColor: "#DBDBDB", + + +}; diff --git a/src/components/nav/Nav.js b/src/components/nav/Nav.js index 3b97709..c5c688c 100644 --- a/src/components/nav/Nav.js +++ b/src/components/nav/Nav.js @@ -28,7 +28,7 @@ const Nav = ({ logOut }) => { document.querySelector(".back-item-img").style.top = `${top}%`; }; return ( -
+
logo diff --git a/src/view/register/index.js b/src/view/register/index.js index 657ccce..1b78a20 100644 --- a/src/view/register/index.js +++ b/src/view/register/index.js @@ -10,6 +10,7 @@ import VerificationInput from "../../components/verificationInput"; import Input from "../../components/input"; import FileInput from "../../components/fileInput"; import Button from "../../components/Button"; +import Stepper from "../../components/Stepper"; const Register = ({ activeLogin }) => { @@ -131,7 +132,7 @@ const Register = ({ activeLogin }) => {

- { + {/* { stepCont.map((item) => (
@@ -152,7 +153,9 @@ const Register = ({ activeLogin }) => { ) ) - } + + } */} +