feat: create component modal, popup and form input
This commit is contained in:
@@ -2,7 +2,7 @@ import { Link } from 'react-router'
|
||||
|
||||
import { APP } from '~/data/meta'
|
||||
|
||||
export const Banner = () => {
|
||||
export default function Banner() {
|
||||
return (
|
||||
<div className="min-h-[65px] sm:mx-10">
|
||||
<div className="relative">
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import { Link } from 'react-router'
|
||||
|
||||
import { LeftArrow } from '~/components/icons/left-arrow'
|
||||
import { APP } from '~/data/meta'
|
||||
|
||||
export default function FormForgotPassword() {
|
||||
return (
|
||||
<div className="flex items-center justify-center">
|
||||
<div className="w-full max-w-md p-6">
|
||||
<div className="absolute top-[80px] left-[50px]">
|
||||
<Link
|
||||
to="/#"
|
||||
className="mt-2 h-full py-2"
|
||||
>
|
||||
<LeftArrow
|
||||
width={'70px'}
|
||||
height={'70px'}
|
||||
></LeftArrow>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="mb-6 flex justify-center">
|
||||
<Link to="/news">
|
||||
<img
|
||||
src={APP.logo}
|
||||
alt={APP.title}
|
||||
className="h-[100px]"
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="mb-4 p-4 text-center">
|
||||
<p className="text-[#565658]">
|
||||
Selamat Datang, silakan isi keterangan akun Anda untuk melanjutkan!
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form>
|
||||
{/* Input Email / No Telepon */}
|
||||
<div className="mb-4">
|
||||
<label
|
||||
htmlFor="email"
|
||||
className="mb-1 block text-gray-700"
|
||||
>
|
||||
Email/No. Telepon
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Contoh: legal@legalgo.id"
|
||||
className="focus:inheriten w-full rounded-md border border-[#DFDFDF] p-2"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Tombol Masuk */}
|
||||
<button className="mt-5 w-full rounded-md bg-[#2E2F7C] py-2 text-white transition hover:bg-blue-800">
|
||||
Daftar
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -28,7 +28,7 @@ const FormLogin = () => {
|
||||
<img
|
||||
src={APP.logo}
|
||||
alt={APP.title}
|
||||
className="h-[100px]"
|
||||
className="h-[80px]"
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
// import { EyeIcon, EyeOffIcon } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { Link } from 'react-router'
|
||||
|
||||
import { LeftArrow } from '~/components/icons/left-arrow'
|
||||
import { APP } from '~/data/meta'
|
||||
|
||||
export default function FormRegister() {
|
||||
const [showPassword, setShowPassword] = useState(false)
|
||||
return (
|
||||
<div className="flex items-center justify-center">
|
||||
<div className="w-full max-w-md p-6">
|
||||
<div className="absolute top-[80px] left-[50px]">
|
||||
<Link
|
||||
to="/#"
|
||||
className="mt-2 h-full py-2"
|
||||
>
|
||||
<LeftArrow
|
||||
width={'70px'}
|
||||
height={'70px'}
|
||||
></LeftArrow>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="mb-6 flex justify-center">
|
||||
<Link to="/news">
|
||||
<img
|
||||
src={APP.logo}
|
||||
alt={APP.title}
|
||||
className="h-[800px]"
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="mb-4 p-4 text-center">
|
||||
<p className="text-[#565658]">
|
||||
Selamat Datang, silakan isi keterangan akun Anda untuk melanjutkan!
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form>
|
||||
{/* Input Email / No Telepon */}
|
||||
<div className="mb-4">
|
||||
<label
|
||||
htmlFor="email"
|
||||
className="mb-1 block text-gray-700"
|
||||
>
|
||||
Email/No. Telepon
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Contoh: legal@legalgo.id"
|
||||
className="focus:inheriten w-full rounded-md border border-[#DFDFDF] p-2"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Input Password */}
|
||||
<div className="relative mb-4">
|
||||
<label
|
||||
htmlFor="password"
|
||||
className="mb-1 block text-gray-700 focus:outline-[#2E2F7C]"
|
||||
>
|
||||
Kata Sandi
|
||||
</label>
|
||||
<input
|
||||
type={showPassword ? 'text' : 'password'}
|
||||
placeholder="Masukkan Kata Sandi"
|
||||
className="w-full rounded-md border border-[#DFDFDF] p-2 pr-10 focus:outline-[#2E2F7C]"
|
||||
required
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
className="absolute top-9 right-3 text-gray-500"
|
||||
onClick={() => setShowPassword(!showPassword)}
|
||||
>
|
||||
{/* {showPassword ? <EyeOffIcon size={18} /> : <EyeIcon size={18} />} */}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Reinput Password */}
|
||||
<div className="relative mb-4">
|
||||
<label
|
||||
htmlFor="password"
|
||||
className="mb-1 block text-gray-700 focus:outline-[#2E2F7C]"
|
||||
>
|
||||
Ulangi Kata Sandi
|
||||
</label>
|
||||
<input
|
||||
type={showPassword ? 'text' : 'password'}
|
||||
placeholder="Masukkan Kata Sandi"
|
||||
className="w-full rounded-md border border-[#DFDFDF] p-2 pr-10 focus:outline-[#2E2F7C]"
|
||||
required
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
className="absolute top-9 right-3 text-gray-500"
|
||||
onClick={() => setShowPassword(!showPassword)}
|
||||
>
|
||||
{/* {showPassword ? <EyeOffIcon size={18} /> : <EyeIcon size={18} />} */}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* No Telepon */}
|
||||
<div className="mb-4">
|
||||
<label
|
||||
htmlFor="no-telpon"
|
||||
className="mb-1 block text-gray-700"
|
||||
>
|
||||
No. Telepon
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Contoh: legal@legalgo.id"
|
||||
className="focus:inheriten w-full rounded-md border border-[#DFDFDF] p-2"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Subscribe*/}
|
||||
<div className="mb-4">
|
||||
<label
|
||||
htmlFor="subscription"
|
||||
className="mb-1 block text-gray-700"
|
||||
>
|
||||
Subscription
|
||||
</label>
|
||||
<select className="focus:inheriten w-full rounded-md border border-[#DFDFDF] p-2">
|
||||
<option selected>Subscription</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{/* Tombol Masuk */}
|
||||
<button className="mt-5 w-full rounded-md bg-[#2E2F7C] py-2 text-white transition hover:bg-blue-800">
|
||||
Daftar
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import React from 'react'
|
||||
import { Link } from 'react-router'
|
||||
|
||||
import { LeftArrow } from '~/components/icons/left-arrow'
|
||||
import { APP } from '~/data/meta'
|
||||
|
||||
export default function FormSubscription() {
|
||||
return (
|
||||
<div className="flex items-center justify-center">
|
||||
<div className="w-full max-w-md p-6">
|
||||
<div className="absolute top-[80px] left-[50px]">
|
||||
<Link
|
||||
to="/#"
|
||||
className="mt-2 h-full py-2"
|
||||
>
|
||||
<LeftArrow
|
||||
width={'70px'}
|
||||
height={'70px'}
|
||||
></LeftArrow>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="mb-6 flex justify-center">
|
||||
<Link to="/news">
|
||||
<img
|
||||
src={APP.logo}
|
||||
alt={APP.title}
|
||||
className="h-[80px]"
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="mb-4 p-4 text-center">
|
||||
<p className="text-[#565658]">
|
||||
Selamat Datang, silakan Pilih Subscription Anda untuk melanjutkan!
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form>
|
||||
{/* Subscribe*/}
|
||||
<div className="mb-4">
|
||||
<label
|
||||
htmlFor="subscription"
|
||||
className="mb-1 block text-gray-700"
|
||||
>
|
||||
Subscription
|
||||
</label>
|
||||
<select className="focus:inheriten w-full rounded-md border border-[#DFDFDF] p-2">
|
||||
<option selected>Subscription</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{/* Tombol Masuk */}
|
||||
<button className="mt-5 w-full rounded-md bg-[#2E2F7C] py-2 text-white transition hover:bg-blue-800">
|
||||
Daftar
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
interface ModalProperties {
|
||||
isOpen: boolean
|
||||
onClose: () => void
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
const Modal = ({ isOpen, onClose, children }: ModalProperties) => {
|
||||
if (!isOpen) return
|
||||
|
||||
return (
|
||||
<div className="bg-opacity-50 fixed inset-0 z-50 flex items-center justify-center bg-black">
|
||||
{/* Modal Container */}
|
||||
<div className="animate-fade-in relative rounded-lg bg-white p-6 shadow-lg">
|
||||
{/* Tombol Close */}
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="absolute top-2 right-2 text-gray-500 hover:text-gray-800"
|
||||
>
|
||||
✖
|
||||
</button>
|
||||
<h1>test</h1>
|
||||
{/* Modal Content */}
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Modal
|
||||
Reference in New Issue
Block a user