refactor(CreateCustomer): replace password visibility toggle from span to button for improved accessibility
This commit is contained in:
@@ -129,14 +129,14 @@ const CreateCustomer = ({ defaultValues, editMode, id }: IProps) => {
|
||||
disabled={editMode}
|
||||
name="password"
|
||||
icon={
|
||||
<span
|
||||
className="cursor-pointer"
|
||||
<button
|
||||
className="absolute right-4.5 top-1/2 z-10 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded text-dark-5 transition hover:text-primary dark:text-white/75 [&>svg]:!static [&>svg]:!size-5 [&>svg]:!translate-y-0"
|
||||
onClick={() => {
|
||||
setShowPassword(!showPassword);
|
||||
}}
|
||||
>
|
||||
<EyeIcon />
|
||||
</span>
|
||||
</button>
|
||||
}
|
||||
iconPosition="right"
|
||||
label="Password"
|
||||
|
||||
Reference in New Issue
Block a user