Added personal image to the pages
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 262 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
import React from "react";
|
||||||
|
import styles from "./hero.module.css";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
|
interface PersonalHeroProps {
|
||||||
|
heading?: string;
|
||||||
|
body?: string;
|
||||||
|
buttonLink?: string;
|
||||||
|
buttonText?: string;
|
||||||
|
};
|
||||||
|
const PersonalHero: React.FC<PersonalHeroProps> = ({
|
||||||
|
heading,
|
||||||
|
body,
|
||||||
|
buttonLink = "#",
|
||||||
|
buttonText,
|
||||||
|
}) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={`w-full relative mb-0 sm:mb-[2.25rem] regLap:h-[30rem] xl:h-[26.875rem] lg:h-[25rem] md:h-[21.875rem] sm:h-[18.75rem] h-[15.625rem] object-cover ${styles.personalHeroBg}`}
|
||||||
|
>
|
||||||
|
<div className="containerMode flex justify-between gap-1 xl:gap-8">
|
||||||
|
<h1 className="max-w-[32.9375rem] font-extrabold text-[1.3rem] leading-[2.5rem] sm:text-[3.625rem] sm:leading-[4.3869rem] text-[#5C2684] cursor-default">
|
||||||
|
{heading}
|
||||||
|
</h1>
|
||||||
|
<p>{body}</p>
|
||||||
|
<Link to={buttonLink}>
|
||||||
|
<button>{buttonText}</button>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PersonalHero;
|
||||||
@@ -7,3 +7,13 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.personalHeroBg{
|
||||||
|
background: url(../../../assets/images/personal-page.jpg) no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
/* padding: 0.4rem 0; */
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
import Hero from "./Hero";
|
import Hero from "./Hero";
|
||||||
|
import PersonalHero from "./PersonalHero";
|
||||||
|
|
||||||
export { Hero };
|
export { Hero, PersonalHero };
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Hero } from "./Hero";
|
import { Hero, PersonalHero } from "./Hero";
|
||||||
import { Requirements } from "./Requirements";
|
import { Requirements } from "./Requirements";
|
||||||
|
|
||||||
export {Hero, Requirements}
|
export {Hero, Requirements, PersonalHero}
|
||||||
@@ -8,7 +8,8 @@ const LetsGetStarted: React.FC = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const [hideOTPComponent, setHideOTPComponent] = React.useState<boolean>(true);
|
const [hideOTPComponent, setHideOTPComponent] = React.useState<boolean>(true);
|
||||||
const inputRef = React.useRef<HTMLInputElement>(null);
|
const firstInputRef = React.useRef<HTMLInputElement>(null);
|
||||||
|
const secondInputRef = React.useRef<HTMLInputElement>(null);
|
||||||
|
|
||||||
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
let { name, value } = e.target as HTMLInputElement;
|
let { name, value } = e.target as HTMLInputElement;
|
||||||
@@ -25,6 +26,7 @@ const LetsGetStarted: React.FC = () => {
|
|||||||
if (regex.test(value)) {
|
if (regex.test(value)) {
|
||||||
if (value?.length == 10) {
|
if (value?.length == 10) {
|
||||||
setHideOTPComponent(false);
|
setHideOTPComponent(false);
|
||||||
|
secondInputRef.current?.focus();
|
||||||
} else setHideOTPComponent(true);
|
} else setHideOTPComponent(true);
|
||||||
} else {
|
} else {
|
||||||
console.log("object not found");
|
console.log("object not found");
|
||||||
@@ -32,6 +34,8 @@ const LetsGetStarted: React.FC = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(secondInputRef)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<div className="containerMode flex justify-between gap-1 xl:gap-8 flex-col">
|
<div className="containerMode flex justify-between gap-1 xl:gap-8 flex-col">
|
||||||
@@ -55,7 +59,8 @@ const LetsGetStarted: React.FC = () => {
|
|||||||
value={pinValues.bvn}
|
value={pinValues.bvn}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
onInput={handleInput}
|
onInput={handleInput}
|
||||||
ref={inputRef}
|
ref={firstInputRef}
|
||||||
|
maxLength={10}
|
||||||
/>
|
/>
|
||||||
{!hideOTPComponent ? (
|
{!hideOTPComponent ? (
|
||||||
<InputCompOne
|
<InputCompOne
|
||||||
@@ -72,7 +77,7 @@ const LetsGetStarted: React.FC = () => {
|
|||||||
value={pinValues.otp}
|
value={pinValues.otp}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
onInput={handleInput}
|
onInput={handleInput}
|
||||||
ref={inputRef}
|
ref={secondInputRef}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export interface InputCompOneProps {
|
|||||||
selectClass?: string;
|
selectClass?: string;
|
||||||
parentSelectClass?: string;
|
parentSelectClass?: string;
|
||||||
parentClass?: string;
|
parentClass?: string;
|
||||||
|
maxLength?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const InputCompOne = forwardRef<HTMLInputElement, InputCompOneProps>(
|
const InputCompOne = forwardRef<HTMLInputElement, InputCompOneProps>(
|
||||||
@@ -47,6 +48,7 @@ const InputCompOne = forwardRef<HTMLInputElement, InputCompOneProps>(
|
|||||||
selectClass,
|
selectClass,
|
||||||
parentSelectClass,
|
parentSelectClass,
|
||||||
parentClass,
|
parentClass,
|
||||||
|
maxLength,
|
||||||
},
|
},
|
||||||
forwardedRef
|
forwardedRef
|
||||||
) => {
|
) => {
|
||||||
@@ -70,6 +72,7 @@ const InputCompOne = forwardRef<HTMLInputElement, InputCompOneProps>(
|
|||||||
tabIndex={tabIndex}
|
tabIndex={tabIndex}
|
||||||
ref={forwardedRef}
|
ref={forwardedRef}
|
||||||
className={inputClass}
|
className={inputClass}
|
||||||
|
maxLength={maxLength}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { HomeLayout } from "../layouts";
|
import { HomeLayout } from "../layouts";
|
||||||
|
import { PersonalHero } from "../components";
|
||||||
|
|
||||||
const BusinessBankingPage: React.FC = () => {
|
const BusinessBankingPage: React.FC = () => {
|
||||||
return <HomeLayout>Business Banking</HomeLayout>;
|
return (
|
||||||
|
<HomeLayout>
|
||||||
|
<PersonalHero />
|
||||||
|
Business Banking
|
||||||
|
</HomeLayout>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default BusinessBankingPage;
|
export default BusinessBankingPage;
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { HomeLayout } from '../layouts'
|
import { HomeLayout } from '../layouts'
|
||||||
|
import { PersonalHero } from '../components'
|
||||||
|
|
||||||
const CooperateBankingPage: React.FC = () => {
|
const CooperateBankingPage: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<HomeLayout>
|
<HomeLayout>
|
||||||
|
<PersonalHero />
|
||||||
Cooperate Banking
|
Cooperate Banking
|
||||||
</HomeLayout>
|
</HomeLayout>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { HomeLayout } from '../layouts'
|
import { HomeLayout } from '../layouts'
|
||||||
|
import { PersonalHero } from '../components'
|
||||||
|
|
||||||
const PersonalBankingPage: React.FC = () => {
|
const PersonalBankingPage: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<HomeLayout>
|
<HomeLayout>
|
||||||
|
<PersonalHero />
|
||||||
Personal Banking
|
Personal Banking
|
||||||
</HomeLayout>
|
</HomeLayout>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user