initiate drf app
This commit is contained in:
36
frontend/components/EmailHandler.tsx
Normal file
36
frontend/components/EmailHandler.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
'use client'
|
||||
|
||||
import React, { useState } from 'react'
|
||||
import Image from 'next/image'
|
||||
|
||||
const EmailHandler = () => {
|
||||
const [email, setEmail] = useState('')
|
||||
|
||||
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setEmail(e.target.value)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="relative w-full">
|
||||
<input
|
||||
type="email"
|
||||
value={email}
|
||||
onChange={handleChange}
|
||||
name="email"
|
||||
placeholder="Введите ваш e-mail"
|
||||
className="w-full px-4 py-3 rounded-md bg-white text-black placeholder:text-gray-400"
|
||||
/>
|
||||
<button className="absolute right-0 top-1/2 -translate-y-1/2 flex items-center justify-center cursor-pointer">
|
||||
<Image
|
||||
src="/images/subscribe.png"
|
||||
alt="submit"
|
||||
width={50}
|
||||
height={50}
|
||||
className="rounded-md"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default EmailHandler
|
||||
Reference in New Issue
Block a user