33import { useRef } from "react" ;
44import { useState } from "react" ;
55import { AnimatePresence , motion } from "motion/react" ;
6+ import { Dialog , DialogBackdrop , DialogPanel } from "@headlessui/react" ;
67
78export 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}
0 commit comments