-
Notifications
You must be signed in to change notification settings - Fork 0
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
e1ddfe9
commit e36c1e1
Showing
3 changed files
with
94 additions
and
3 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
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,63 @@ | ||
import { Badge } from "@/components/ui/badge"; | ||
import Link from "next/link"; | ||
import { | ||
Card, | ||
CardContent, | ||
CardDescription, | ||
CardHeader, | ||
CardTitle, | ||
CardFooter, | ||
} from "@/components/ui/card"; | ||
import { Separator } from "@/components/ui/separator"; | ||
|
||
interface ChallengeIntroProps { | ||
button: () => React.ReactNode; | ||
} | ||
|
||
const ChallengeIntro: React.FC<ChallengeIntroProps> = ({ button }) => { | ||
return ( | ||
<Card className='mx-auto my-8 h-[420px] w-2/3 rounded-2xl bg-gray-800'> | ||
<CardHeader className='p-4'> | ||
<CardTitle className='mb-4 text-3xl font-semibold text-white'> | ||
We're glad you're here! | ||
</CardTitle> | ||
<CardDescription> | ||
<Badge className='rounded-full bg-blue-400 px-2 py-1 text-white'> | ||
Alpha | ||
</Badge> | ||
</CardDescription> | ||
</CardHeader> | ||
<Separator className='bg-gray-700' /> | ||
<CardContent className='p-4'> | ||
<p className='text-gray-300'> | ||
It's simple. We'll provide you a coding | ||
environment and a target image. Your job is to recreate that | ||
image using{" "} | ||
<span className='font-semibold text-green-500'>HTML</span>{" "} | ||
and{" "} | ||
<span className='font-semibold text-green-500'> | ||
TailwindCSS | ||
</span> | ||
. After you submit, we'll send your scores via Email | ||
📧. | ||
</p> | ||
</CardContent> | ||
<CardFooter className='p-4'> | ||
<p className='text-sm text-muted-foreground'> | ||
At this stage, we're presenting a bare bones look at | ||
what's to come for Tailspin and looking for{" "} | ||
<Link href='#rating' className='text-blue-500 underline'> | ||
feedback | ||
</Link> | ||
! | ||
</p> | ||
</CardFooter> | ||
<Separator className='bg-gray-700' /> | ||
<div className='flex items-center justify-center p-4'> | ||
{button()} | ||
</div> | ||
</Card> | ||
); | ||
}; | ||
|
||
export default ChallengeIntro; |
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,28 @@ | ||
"use client"; | ||
|
||
import { useState } from "react"; | ||
import ChallengeIntro from "./challenge-intro"; | ||
import StepperCard from "./stepper-pages/StepperCard"; | ||
import { Button } from "@/components/ui/button"; | ||
import { Code } from "lucide-react"; | ||
|
||
const ChallengeMain = () => { | ||
const [goToStepper, setGoToStepper] = useState(false); | ||
|
||
const readyToCodeButton = () => { | ||
return ( | ||
<Button onClick={() => setGoToStepper(true)}> | ||
<code>Ready to code</code> | ||
<Code className='ml-2' /> | ||
</Button> | ||
); | ||
}; | ||
return ( | ||
<> | ||
{!goToStepper && <ChallengeIntro button={readyToCodeButton} />} | ||
{goToStepper && <StepperCard />} | ||
</> | ||
); | ||
}; | ||
|
||
export default ChallengeMain; |