-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f55e8a7
commit 8fe8a5c
Showing
13 changed files
with
345 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<div className="relative w-full bg-[#0E0F0E] bg-cover bg-center bg-no-repeat"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
const Layout = ({ children }: { children: React.ReactNode }) => { | ||
return ( | ||
<> | ||
<main className="grow">{children}</main> | ||
</> | ||
); | ||
}; | ||
|
||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import React from 'react' | ||
import Tutor from './tutor' | ||
|
||
function Page() { | ||
return ( | ||
<div> | ||
|
||
<Tutor /> | ||
</div> | ||
) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,87 @@ | ||
import React from 'react' | ||
"use client"; | ||
import Input from "@/components/Forms/Input"; | ||
import React from "react"; | ||
import TextArea from "@/components/Forms/TextArea"; | ||
import Selector from "@/components/Forms/Selector"; | ||
import Checkbox from "@/components/Forms/Checkbox"; | ||
import Button from "@/components/Forms/Button"; | ||
|
||
const skills = [ | ||
"UI/UX", | ||
"Solidity", | ||
"TypeScript", | ||
"Cairo", | ||
"Rust", | ||
"React.js", | ||
"Tailwind CSS", | ||
"Node JS", | ||
]; | ||
|
||
function Tutor() { | ||
const handleSkillSelection = (selectedSkills: string[]) => {}; | ||
const handleContinue = () => {}; | ||
|
||
return ( | ||
<div> | ||
|
||
<div className="grid grid-cols-1 md:grid-cols-5 h-screen"> | ||
<div className="hidden md:block hexagon-img border-r-2 border-[#1D1E2B] md:col-span-2 h-screen"></div> | ||
<div className="col-span-1 md:col-span-3 h-screen overflow-y-auto py-10 md:py-20 px-5 md:px-8"> | ||
<div className="flex flex-col justify-center items-center px-3 md:px-0"> | ||
<div className="header-details text-center"> | ||
<h2 className="text-white font-UbuntuBold text-[1.5rem] mb-2"> | ||
Build your profile as tutor | ||
</h2> | ||
<p className="text-grayText text-[0.875rem]"> | ||
Enter your professional details | ||
</p> | ||
</div> | ||
<div className="flex flex-col gap-6 w-full max-w-md"> | ||
<div className="mt-5 md:mt-10 w-full"> | ||
<Input | ||
type="text" | ||
name="title" | ||
placeholder="eg. Web3 Developer" | ||
label="Title" | ||
onChange={null} | ||
value="" | ||
/> | ||
</div> | ||
<div className="w-full"> | ||
<TextArea | ||
name="bio" | ||
placeholder="Tell us about yourself" | ||
label="Brief Bio" | ||
onChange={null} | ||
value="" | ||
/> | ||
</div> | ||
<div className="w-full"> | ||
<Input | ||
type="email" | ||
name="email" | ||
placeholder="Enter your email" | ||
label="Email" | ||
onChange={null} | ||
value="" | ||
/> | ||
</div> | ||
<div className="w-full"> | ||
<Selector | ||
dataArray={skills} | ||
onSelectionChange={handleSkillSelection} | ||
label="Select skills (At least 5)" | ||
/> | ||
</div> | ||
<div className="my-2"> | ||
<Checkbox isAgreement={true} privacyUrl="" termsUrl="" /> | ||
</div> | ||
<div className="my-2 w-full"> | ||
<Button label="CONTINUE" onButtonClick={handleContinue} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
); | ||
} | ||
|
||
export default Tutor | ||
export default Tutor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
|
||
function Button({ | ||
label, | ||
onButtonClick, | ||
}: { | ||
label: string; | ||
onButtonClick: any; | ||
}) { | ||
return ( | ||
<div className="flex flex-col"> | ||
<button | ||
onClick={onButtonClick} | ||
className="bg-white border-[1px] outline-none border-[#252625] text-black text-[1.125rem] px-4 py-[0.75rem] rounded-[0.5rem] font-UbuntuBold w-full md:w-[26rem]" | ||
> | ||
{label} | ||
</button> | ||
</div> | ||
); | ||
} | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React, { useState } from "react"; | ||
|
||
interface CheckboxProps { | ||
termsUrl?: string; | ||
privacyUrl?: string; | ||
isAgreement?: boolean; | ||
onChange?: (checked: boolean) => void; | ||
} | ||
|
||
const Checkbox: React.FC<CheckboxProps> = ({ | ||
termsUrl, | ||
privacyUrl, | ||
onChange, | ||
isAgreement, | ||
}) => { | ||
const [isChecked, setIsChecked] = useState(false); | ||
|
||
const handleCheckboxChange = () => { | ||
const newCheckedState = !isChecked; | ||
setIsChecked(newCheckedState); | ||
if (onChange) { | ||
onChange(newCheckedState); | ||
} | ||
}; | ||
|
||
return ( | ||
<div className="agreement-checkbox w-full md:w-[26rem] flex items-start"> | ||
<input | ||
type="checkbox" | ||
id="agreement" | ||
checked={isChecked} | ||
onChange={handleCheckboxChange} | ||
/> | ||
{isAgreement && ( | ||
<label | ||
htmlFor="agreement" | ||
className="text-[0.875rem] text-grayText cursor-pointer" | ||
> | ||
By clicking on this, you agree to the{" "} | ||
<a | ||
href={termsUrl} | ||
target="_blank" | ||
className="text-primary font-UbuntuBold" | ||
rel="noopener noreferrer" | ||
> | ||
<span className="highlight">Terms & Conditions</span> | ||
</a>{" "} | ||
and{" "} | ||
<a | ||
href={privacyUrl} | ||
target="_blank" | ||
className="text-primary font-UbuntuBold" | ||
rel="noopener noreferrer" | ||
> | ||
<span className="highlight">Privacy Policy</span> | ||
</a>{" "} | ||
governing StarkHero. | ||
</label> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Checkbox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from "react"; | ||
|
||
function Input({ | ||
type, | ||
name, | ||
label, | ||
placeholder, | ||
value, | ||
onChange, | ||
}: { | ||
type: string; | ||
name: string; | ||
label: string; | ||
placeholder: string; | ||
value: string; | ||
onChange: any; | ||
}) { | ||
return ( | ||
<div className="flex flex-col"> | ||
<label htmlFor={name} className="text-[#9596A0] text-[0.875rem] mb-1"> | ||
{label} | ||
</label> | ||
<input | ||
type={type} | ||
name={name} | ||
id={name} | ||
placeholder={placeholder} | ||
value={value} | ||
onChange={onChange} | ||
className="bg-transparent border-[1px] outline-none border-[#252625] text-white text-[0.875rem] w-full md:w-[26rem] px-4 py-[0.75rem] rounded-[0.5rem]" | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React, { useState } from "react"; | ||
|
||
interface SelectorProps { | ||
dataArray: string[]; | ||
minSelection?: number; | ||
label?: string; | ||
onSelectionChange?: (selectedSkills: string[]) => void; | ||
} | ||
|
||
const Selector: React.FC<SelectorProps> = ({ | ||
dataArray, | ||
minSelection = 5, | ||
onSelectionChange, | ||
label, | ||
}) => { | ||
const [selectedSkills, setSelectedSkills] = useState<string[]>([]); | ||
|
||
const handleSkillClick = (skill: string) => { | ||
let updatedSelection; | ||
if (selectedSkills.includes(skill)) { | ||
updatedSelection = selectedSkills.filter((s) => s !== skill); | ||
} else { | ||
updatedSelection = [...selectedSkills, skill]; | ||
} | ||
|
||
setSelectedSkills(updatedSelection); | ||
if (onSelectionChange) { | ||
onSelectionChange(updatedSelection); | ||
} | ||
}; | ||
|
||
return ( | ||
<div className="skills-selector text-[0.875rem] w-full md:w-[26rem]"> | ||
<label className="text-[#9596A0] text-[0.875rem]">{label}</label> | ||
<div className="skills-container grid grid-cols-3 mt-1 gap-3"> | ||
{dataArray.map((item) => ( | ||
<button | ||
key={item} | ||
className={`skill-button border-[1px] border-[#252625] p-2 text-[0.875rem] rounded-[0.5rem] ${ | ||
selectedSkills.includes(item) ? "bg-[#333]" : "" | ||
}`} | ||
onClick={() => handleSkillClick(item)} | ||
> | ||
{item} | ||
</button> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Selector; |
Oops, something went wrong.