@@ -7,12 +7,13 @@ import { Dialog, DialogBackdrop, DialogPanel } from "@headlessui/react";
7
7
8
8
export function SignUpForm ( ) {
9
9
return (
10
- < div className = "flex" >
10
+ < form className = "flex" method = "POST" action = "https://app.kit.com/forms/7712177/subscriptions ">
11
11
< div className = "flex items-center rounded-full bg-white" >
12
12
< input
13
13
autoFocus
14
14
type = "email"
15
15
id = "email"
16
+ name = "email_address"
16
17
className = "w-3xs rounded-full bg-transparent px-4 py-2 text-sm/6 text-gray-950 focus:outline-none"
17
18
placeholder = "Enter your email"
18
19
aria-label = "Email address"
@@ -21,12 +22,12 @@ export function SignUpForm() {
21
22
Sign up
22
23
</ button >
23
24
</ div >
24
- </ div >
25
+ </ form >
25
26
) ;
26
27
}
27
28
28
29
export function HeroActions ( ) {
29
- let [ signUpState , setSignUpState ] = useState < "closed" | "open" | "subscribed" > ( "closed" ) ;
30
+ let [ signUpState , setSignUpState ] = useState < "closed" | "open" > ( "closed" ) ;
30
31
let input = useRef < HTMLInputElement > ( null ) ;
31
32
let getCourseButton = useRef ( null ) ;
32
33
let containerRef = useRef < HTMLInputElement > ( null ) ;
@@ -48,7 +49,7 @@ export function HeroActions() {
48
49
ref = { containerRef }
49
50
layout
50
51
transition = { { duration : signUpState === "open" ? 0.1 : 0.2 , ease : "circOut" } }
51
- className = "relative flex items-center bg-white data-[state=open]:overflow-hidden data-[state=subscribed]:bg-gray-950 "
52
+ className = "relative flex items-center bg-white data-[state=open]:overflow-hidden"
52
53
style = { { borderRadius : 20 } }
53
54
data-state = { signUpState }
54
55
>
@@ -124,33 +125,6 @@ export function HeroActions() {
124
125
Get the free course →
125
126
</ motion . button >
126
127
) }
127
- { signUpState === "subscribed" && (
128
- < motion . button
129
- onClick = { ( ) => setSignUpState ( "closed" ) }
130
- layout
131
- transition = { { duration : 0.3 } }
132
- 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"
133
- initial = { {
134
- opacity : 0 ,
135
- } }
136
- animate = { {
137
- opacity : 1 ,
138
- } }
139
- exit = { {
140
- opacity : 0 ,
141
- } }
142
- >
143
- < svg width = { 20 } height = { 20 } fill = "none" className = "self-center stroke-white" >
144
- < path d = "M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
145
- < path
146
- d = "M13.91 9.67a.37.37 0 0 1 0 .66l-5.6 3.11a.38.38 0 0 1-.56-.33V6.9c0-.29.3-.47.56-.33l5.6 3.11Z"
147
- strokeLinecap = "round"
148
- strokeLinejoin = "round"
149
- />
150
- </ svg >
151
- You're in
152
- </ motion . button >
153
- ) }
154
128
</ AnimatePresence >
155
129
</ motion . div >
156
130
</ div >
@@ -186,8 +160,8 @@ export function HeroActions() {
186
160
< Dialog open = { isDialogOpen } onClose = { ( ) => setIsDialogOpen ( false ) } >
187
161
< DialogBackdrop className = "fixed inset-0 bg-black/85" />
188
162
< div className = "fixed inset-0 grid place-items-center" >
189
- < DialogPanel >
190
- < video controls className = "rounded-2xl" >
163
+ < DialogPanel className = "max-w-7xl p-8" >
164
+ < video autoPlay controls className = "aspect-video rounded-2xl" >
191
165
< source src = "https://assets.tailwindcss.com/build-uis-that-dont-suck/intro.mp4" type = "video/mp4" />
192
166
</ video >
193
167
</ DialogPanel >
0 commit comments