Skip to content

Commit f421621

Browse files
committed
WIP
1 parent 10b9829 commit f421621

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/app/course/call-to-action.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useRef } from "react";
44
import { useState } from "react";
55
import { AnimatePresence, motion } from "motion/react";
6+
import { Dialog, DialogBackdrop, DialogPanel } from "@headlessui/react";
67

78
export function SignUpForm() {
89
return (
@@ -29,6 +30,7 @@ export function HeroActions() {
2930
let input = useRef<HTMLInputElement>(null);
3031
let getCourseButton = useRef(null);
3132
let containerRef = useRef<HTMLInputElement>(null);
33+
let [isDialogOpen, setIsDialogOpen] = useState(false);
3234

3335
const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {
3436
if (!input.current) return;
@@ -155,6 +157,7 @@ export function HeroActions() {
155157
<AnimatePresence initial={false}>
156158
{signUpState === "closed" && (
157159
<motion.button
160+
onClick={() => setIsDialogOpen(true)}
158161
layout
159162
transition={{ duration: 0.3 }}
160163
className="inline-flex flex-nowrap items-baseline gap-1.5 self-center rounded-full bg-white/25 px-4 py-2 pl-3 text-sm/6 font-semibold whitespace-nowrap text-white hover:bg-white/30"
@@ -180,6 +183,16 @@ export function HeroActions() {
180183
</motion.button>
181184
)}
182185
</AnimatePresence>
186+
<Dialog open={isDialogOpen} onClose={() => setIsDialogOpen(false)}>
187+
<DialogBackdrop className="fixed inset-0 bg-black/85" />
188+
<div className="fixed inset-0 grid place-items-center">
189+
<DialogPanel>
190+
<video controls className="rounded-2xl">
191+
<source src="https://assets.tailwindcss.com/build-uis-that-dont-suck/intro.mp4" type="video/mp4" />
192+
</video>
193+
</DialogPanel>
194+
</div>
195+
</Dialog>
183196
</div>
184197
);
185198
}

src/app/course/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default async function Course() {
3737
<GridContainer>
3838
<p className="max-w-2xl text-lg/7 font-medium text-gray-400">
3939
<strong className="font-medium text-white">Short, tactical video lessons</strong> from the creator of
40-
TailwindCSS, delivered directly to your inbox{" "}
40+
Tailwind CSS, delivered directly to your inbox{" "}
4141
<strong className="font-medium text-white">every day for a week</strong>.
4242
</p>
4343
</GridContainer>

0 commit comments

Comments
 (0)