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}
|
disabled={editMode}
|
||||||
name="password"
|
name="password"
|
||||||
icon={
|
icon={
|
||||||
<span
|
<button
|
||||||
className="cursor-pointer"
|
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={() => {
|
onClick={() => {
|
||||||
setShowPassword(!showPassword);
|
setShowPassword(!showPassword);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<EyeIcon />
|
<EyeIcon />
|
||||||
</span>
|
</button>
|
||||||
}
|
}
|
||||||
iconPosition="right"
|
iconPosition="right"
|
||||||
label="Password"
|
label="Password"
|
||||||
|
|||||||
Reference in New Issue
Block a user