complete reset password page - change input component - create combobox component

This commit is contained in:
Alihaghighattalab
2024-08-05 12:20:59 +03:30
parent 7c22c9e132
commit 0e5089aad5
8 changed files with 313 additions and 33 deletions
+10 -9
View File
@@ -1,5 +1,6 @@
import { Eye, EyeSlash } from "iconsax-react"
import { FC, useState } from "react"
import React, { FC, useState } from "react"
import { Input as InputComponent } from '@headlessui/react'
type Props = {
style?: string,
@@ -12,15 +13,15 @@ export const Input: FC<Props> = ({ placeholder, type = "text", icon }) => {
const [hidden, setHidden] = useState<boolean>(false)
const handleHidden = () => setHidden(prev => !prev)
return (
<div className="w-full min-w-[250px] sm:min-w-[400px]">
<div className="relative w-full min-w-[200px]">
<div className="absolute top-[18.5px] left-5 grid h-5 w-5 place-items-center text-blue-gray-500">
{type === "password" ?
!hidden ? <Eye size="23" color="#777577" onClick={handleHidden} /> : <EyeSlash size="23" color="#777577" onClick={handleHidden} />
: icon}
</div>
<input type={type === "password" && hidden ? "text" : type} className="input-style" placeholder={placeholder} />
<div className="relative w-full min-w-[250px] sm:min-w-[400px]">
<div className="absolute top-[18.5px] left-5 grid h-5 w-5 place-items-center text-blue-gray-500">
{type === "password" ?
!hidden ? <Eye size="23" color="#777577" onClick={handleHidden} /> : <EyeSlash size="23" color="#777577" onClick={handleHidden} />
: icon}
</div>
<InputComponent type={type === "password" && hidden ? "text" : type} placeholder={placeholder} className="input-style" />
</div>
)
}