From 2145ce0476a9b0037ae9b1a40cd2b82b03427151 Mon Sep 17 00:00:00 2001 From: priyanshuvish Date: Tue, 15 Oct 2024 12:05:29 +0530 Subject: [PATCH] final wallet program --- .../wallet/CreateBenefitWalletModal.jsx | 129 ++++++++++-------- 1 file changed, 69 insertions(+), 60 deletions(-) diff --git a/src/Pages/OptiFiiExpense/wallet/CreateBenefitWalletModal.jsx b/src/Pages/OptiFiiExpense/wallet/CreateBenefitWalletModal.jsx index 9a0b46e..823da94 100644 --- a/src/Pages/OptiFiiExpense/wallet/CreateBenefitWalletModal.jsx +++ b/src/Pages/OptiFiiExpense/wallet/CreateBenefitWalletModal.jsx @@ -1,8 +1,6 @@ import React, { useState } from 'react'; import { Box, Modal, ModalOverlay, ModalContent, ModalHeader, ModalBody, ModalCloseButton, Text, Input, Select, Stack, - InputGroup, - InputLeftElement, HStack, Divider, Button @@ -11,19 +9,16 @@ import { Step, StepIndicator, StepSeparator, - StepStatus, StepTitle, Stepper, } from '@chakra-ui/react'; -import { IoIosCheckmark } from "react-icons/io"; -import { MdCurrencyRupee } from "react-icons/md"; -import { HiOutlineExclamationCircle } from "react-icons/hi2"; -import PrimaryButton from "../../../../src/Components/Buttons/PrimaryButton" +import { IoCheckmark } from "react-icons/io5"; +import PrimaryButton from "../../../../src/Components/Buttons/PrimaryButton"; import RupeeSlider from '../../../Components/RupeeSlider/RupeeSlider'; import BenifitStepOne from './BenifitStepOne'; -import SubmissionPolicy from './SubmissionPolicy'; -import DefineBudget from './DefineBudget'; - +import BenifitStepTwo from './BenifitStepTwo'; +import BenifitStepThree from './BenifitStepThree'; + const CreateBenefitWalletModal = ({ isOpen, onClose }) => { // Define steps const steps = [ @@ -57,48 +52,66 @@ const CreateBenefitWalletModal = ({ isOpen, onClose }) => { Create Benefit Wallet - {/* Stepper Component */} - - {steps.map((step, index) => ( - - - - {index < activeStep ? ( - - ) : ( - {index + 1} + {/* Stepper Component with 130% width, custom scrollbar and horizontal scroll */} + + {/* Set the stepper width to 130% */} + + {steps.map((step, index) => ( + + + + {index < activeStep ? ( + + ) : ( + {index + 1} + )} + + + + + + + {step.title} + + + + + {index !== steps.length - 1 && ( + )} - - - - - - - {step.title} - - - - - {index !== steps.length - 1 && ( - - )} - - ))} - + + ))} + + + {/* Conditionally render form fields based on active step */} @@ -111,28 +124,24 @@ const CreateBenefitWalletModal = ({ isOpen, onClose }) => { {/* Step 2 Content: Approval Policy */} {activeStep === 1 && ( - - Approval Policy - This is step 2 content. - + )} {/* Step 3 Content: Submission Policy */} {activeStep === 2 && ( - - - + )} {/* Step 4 Content: Define Budget */} {activeStep === 3 && ( - + Define Budget + )} {/* Stepper Controls */} - +