|
1 | | -"use client"; |
2 | | -import React, { ReactElement, useState } from "react"; |
| 1 | +import React from "react"; |
| 2 | +import { H2 } from "../Typography"; |
| 3 | +import { Input } from "../Form"; |
| 4 | +import { Button } from "../Buttons"; |
| 5 | +import Link from "next/link"; |
3 | 6 |
|
4 | | -export function Login(): ReactElement { |
5 | | - const [customClass, setCustomClass] = useState(false); |
6 | | - |
7 | | - const handleClick = () => { |
8 | | - setCustomClass(true); |
9 | | - setTimeout(() => { |
10 | | - setCustomClass(false); |
11 | | - }, 150); |
12 | | - }; |
| 7 | +export function Login() { |
13 | 8 | return ( |
14 | | - <div className="max-w-80 bg-rose-400 border-2 border-black shadow-md "> |
15 | | - <div className="font-head text-3xl text-center px-4 py-2 my-2 "> |
16 | | - Login |
| 9 | + <div className="max-w-80 p-4 border-2 border-black shadow-md space-y-3"> |
| 10 | + <div className="text-center"> |
| 11 | + <H2>Login</H2> |
17 | 12 | </div> |
18 | | - <form |
19 | | - onSubmit={(e) => { |
20 | | - e.preventDefault(); |
21 | | - }} |
22 | | - className="flex flex-col gap-8" |
23 | | - > |
| 13 | + <form className="flex flex-col gap-5 "> |
24 | 14 | <div className="flex flex-col items-center justify-center"> |
25 | 15 | <label htmlFor="email" className="w-11/12"> |
26 | 16 | Email |
27 | 17 | </label> |
28 | | - <input |
29 | | - id="email" |
30 | | - type="email" |
31 | | - placeholder="Email" |
32 | | - className="px-4 py-2 w-11/12 font-body border-2 border-black shadow-md transition focus:outline-none focus:shadow-xs " |
33 | | - /> |
| 18 | + <Input id="email" type="email" placeholder="email" /> |
34 | 19 | </div> |
35 | 20 | <div className="flex flex-col items-center justify-center"> |
36 | | - <label htmlFor="email" className="w-11/12"> |
| 21 | + <label htmlFor="password" className="w-11/12"> |
37 | 22 | Password |
38 | 23 | </label> |
39 | | - <input |
40 | | - type="password" |
41 | | - placeholder="Password" |
42 | | - className={`px-4 py-2 w-11/12 font-body border-2 border-black shadow-md transition focus:outline-none focus:shadow-xs`} |
43 | | - /> |
| 24 | + <Input id="password" type="password" placeholder="password" /> |
44 | 25 | </div> |
45 | | - <div className="flex flex-col items-center justify-center py-4"> |
46 | | - <button |
47 | | - onClick={handleClick} |
48 | | - className={`px-6 py-2 w-1/2 text-sm font-head bg-primary-400 rounded-full border-2 border-black shadow-md transition-all ${ |
49 | | - customClass ? "bg-primary-500 scale-95 shadow-xs" : "" |
50 | | - }`} |
51 | | - > |
52 | | - submit |
53 | | - </button> |
54 | | - <p className="px-4 py-2 "> |
55 | | - Don't have an account? <a href="/">sign-in</a> |
56 | | - </p> |
| 26 | + <div className="flex flex-col items-center justify-center py-4 gap-1"> |
| 27 | + <Button className="rounded-full active:shadow-none active:scale-95"> |
| 28 | + Submit |
| 29 | + </Button> |
| 30 | + <div className="px-4 py-2 space-x-1"> |
| 31 | + <span>Don't have an account?</span> |
| 32 | + <Link href="/" className="text-primary-700 hover:underline"> |
| 33 | + sign-in |
| 34 | + </Link> |
| 35 | + </div> |
57 | 36 | </div> |
58 | 37 | </form> |
59 | 38 | </div> |
|
0 commit comments