|
@@ -190,45 +190,52 @@ export default function LoginModal({
|
|
|
<CommonModal
|
|
<CommonModal
|
|
|
isOpen={isShow}
|
|
isOpen={isShow}
|
|
|
onClose={closeModal}
|
|
onClose={closeModal}
|
|
|
- header={
|
|
|
|
|
- <div className="relative flex justify-center items-center pt-6 px-4 pb-4">
|
|
|
|
|
- <button
|
|
|
|
|
- className={clsx("flex-none",{
|
|
|
|
|
- "text-ly-18 font-bold": activeTab === "register",
|
|
|
|
|
- "text-ly-16 font-media text-ly-deepgray": activeTab !== "register"
|
|
|
|
|
- })}
|
|
|
|
|
- onClick={() => toggleLoginRegister("register")}
|
|
|
|
|
- >
|
|
|
|
|
- Register
|
|
|
|
|
|
|
+ contentClassName={"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 h-145 w-99.5 bg-white rounded-xl"}
|
|
|
|
|
+ header={<div className="box-border w-full pt-6 px-6 pb-6">
|
|
|
|
|
+ <div className="flex justify-end">
|
|
|
|
|
+ <button className="w-6 h-6 flex-none" onClick={() => closeModal(false)}>
|
|
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" className="h-6 transition-all ease-in-out hover:scale-110"><path strokeLinecap="round" strokeLinejoin="round" d="M6 18 18 6M6 6l12 12"></path></svg>
|
|
|
</button>
|
|
</button>
|
|
|
- <span className="flex-none w-0.5 h-4.5 bg-ly-deepgray mx-5"></span>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div className="relative flex justify-center items-center mt-1.5">
|
|
|
<button
|
|
<button
|
|
|
className={clsx("flex-none",{
|
|
className={clsx("flex-none",{
|
|
|
"text-ly-18 font-bold": activeTab === "login",
|
|
"text-ly-18 font-bold": activeTab === "login",
|
|
|
- "text-ly-16 font-media text-ly-deepgray": activeTab !== "login"
|
|
|
|
|
|
|
+ "text-ly-18 text-ly-deepgray": activeTab !== "login"
|
|
|
})}
|
|
})}
|
|
|
onClick={() => toggleLoginRegister("login")}
|
|
onClick={() => toggleLoginRegister("login")}
|
|
|
>
|
|
>
|
|
|
- Sign in
|
|
|
|
|
|
|
+ Log in
|
|
|
</button>
|
|
</button>
|
|
|
-
|
|
|
|
|
- <button className="absolute top-4 right-4 w-6 h-6" onClick={() => closeModal(false)}>
|
|
|
|
|
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" className="h-6 transition-all ease-in-out hover:scale-110"><path strokeLinecap="round" strokeLinejoin="round" d="M6 18 18 6M6 6l12 12"></path></svg>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <span className="flex-none w-0.5 h-4.5 bg-ly-deepgray mx-5"></span>
|
|
|
|
|
+ <button
|
|
|
|
|
+ className={clsx("flex-none",{
|
|
|
|
|
+ "text-ly-18 font-bold": activeTab === "register",
|
|
|
|
|
+ "text-ly-18 text-ly-deepgray": activeTab !== "register"
|
|
|
|
|
+ })}
|
|
|
|
|
+ onClick={() => toggleLoginRegister("register")}
|
|
|
|
|
+ >
|
|
|
|
|
+ Sign Up
|
|
|
</button>
|
|
</button>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ </div>}
|
|
|
|
|
+ footer={<div className="h-6">{/**布局占位 */}</div>}
|
|
|
body={
|
|
body={
|
|
|
<>
|
|
<>
|
|
|
<form
|
|
<form
|
|
|
- className={clsx("relative px-4 pt-2 pb-6",{
|
|
|
|
|
|
|
+ className={clsx("relative box-border px-6",{
|
|
|
"hidden": activeTab !== 'register'
|
|
"hidden": activeTab !== 'register'
|
|
|
})}
|
|
})}
|
|
|
onSubmit={registerForm.handleSubmit(registerSubmit)}
|
|
onSubmit={registerForm.handleSubmit(registerSubmit)}
|
|
|
>
|
|
>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div className="w-full flex justify-between">
|
|
<div className="w-full flex justify-between">
|
|
|
<div className="w-41.25 flex-none">
|
|
<div className="w-41.25 flex-none">
|
|
|
- <label className="text-ly-12 block mb-3 font-semibold">
|
|
|
|
|
|
|
+ <label className="text-ly-16 block mb-1">
|
|
|
First Name *
|
|
First Name *
|
|
|
</label>
|
|
</label>
|
|
|
<InputText
|
|
<InputText
|
|
@@ -245,7 +252,7 @@ export default function LoginModal({
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="w-41.25 flex-none">
|
|
<div className="w-41.25 flex-none">
|
|
|
- <label className="text-ly-12 block mb-3 font-semibold">
|
|
|
|
|
|
|
+ <label className="text-ly-16 block mb-1">
|
|
|
Last Name *
|
|
Last Name *
|
|
|
</label>
|
|
</label>
|
|
|
<InputText
|
|
<InputText
|
|
@@ -264,7 +271,7 @@ export default function LoginModal({
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<div className="w-full mt-4">
|
|
<div className="w-full mt-4">
|
|
|
- <label className="text-ly-12 block mb-3 font-semibold">
|
|
|
|
|
|
|
+ <label className="text-ly-16 block mb-1">
|
|
|
Email *
|
|
Email *
|
|
|
</label>
|
|
</label>
|
|
|
<InputText
|
|
<InputText
|
|
@@ -282,7 +289,7 @@ export default function LoginModal({
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="w-full mt-4">
|
|
<div className="w-full mt-4">
|
|
|
- <label className="text-ly-12 block mb-3 font-semibold">
|
|
|
|
|
|
|
+ <label className="text-ly-16 block mb-1">
|
|
|
Password *
|
|
Password *
|
|
|
</label>
|
|
</label>
|
|
|
<PasswordInput
|
|
<PasswordInput
|
|
@@ -307,7 +314,7 @@ export default function LoginModal({
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="w-full mt-4">
|
|
<div className="w-full mt-4">
|
|
|
- <label className="text-ly-12 block mb-3 font-semibold">
|
|
|
|
|
|
|
+ <label className="text-ly-16 block mb-1">
|
|
|
Confirm Password *
|
|
Confirm Password *
|
|
|
</label>
|
|
</label>
|
|
|
<PasswordInput
|
|
<PasswordInput
|
|
@@ -334,7 +341,7 @@ export default function LoginModal({
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="w-full mt-4">
|
|
<div className="w-full mt-4">
|
|
|
- <label className="text-ly-12 block mb-3 font-semibold">Phone number *</label>
|
|
|
|
|
|
|
+ <label className="text-ly-16 block mb-1">Phone number *</label>
|
|
|
<Controller
|
|
<Controller
|
|
|
name="phone"
|
|
name="phone"
|
|
|
control={registerForm.control}
|
|
control={registerForm.control}
|
|
@@ -413,19 +420,19 @@ export default function LoginModal({
|
|
|
|
|
|
|
|
</label>
|
|
</label>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</form>
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
<form
|
|
<form
|
|
|
- className={clsx("relative px-4 pt-2",{
|
|
|
|
|
|
|
+ className={clsx("relative px-6",{
|
|
|
"hidden": activeTab !== "login"
|
|
"hidden": activeTab !== "login"
|
|
|
})}
|
|
})}
|
|
|
onSubmit={loginForm.handleSubmit(loginSubmit)}
|
|
onSubmit={loginForm.handleSubmit(loginSubmit)}
|
|
|
>
|
|
>
|
|
|
|
|
|
|
|
<div className="w-full">
|
|
<div className="w-full">
|
|
|
- <label className="text-ly-12 block mb-3 font-semibold">
|
|
|
|
|
|
|
+ <label className="text-ly-16 block mb-1">
|
|
|
Email *
|
|
Email *
|
|
|
</label>
|
|
</label>
|
|
|
<InputText
|
|
<InputText
|
|
@@ -442,7 +449,7 @@ export default function LoginModal({
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="w-full mt-4">
|
|
<div className="w-full mt-4">
|
|
|
- <label className="text-ly-12 block mb-3 font-semibold">
|
|
|
|
|
|
|
+ <label className="text-ly-16 block mb-1">
|
|
|
Password *
|
|
Password *
|
|
|
</label>
|
|
</label>
|
|
|
<PasswordInput
|
|
<PasswordInput
|
|
@@ -466,7 +473,7 @@ export default function LoginModal({
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <button className="flex items-center justify-center mt-6 w-full h-12 bg-ly-green text-white rounded-3xl text-ly-16 font-bold">Log In</button>
|
|
|
|
|
|
|
+ <button className="flex items-center justify-center mt-6 w-full h-12 bg-ly-green text-white rounded-3xl text-ly-16">Log In</button>
|
|
|
|
|
|
|
|
</form>
|
|
</form>
|
|
|
</>
|
|
</>
|