From 44a592f7a740e551c1d6fc369283bdb4e66c1aee Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 8 Jun 2024 13:36:02 -0600 Subject: [PATCH] refactor: simplify props --- components/shared/toggle-visibility-input.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/components/shared/toggle-visibility-input.tsx b/components/shared/toggle-visibility-input.tsx index 697008e5..d3a2b5e3 100644 --- a/components/shared/toggle-visibility-input.tsx +++ b/components/shared/toggle-visibility-input.tsx @@ -3,14 +3,7 @@ import { EyeIcon, EyeOffIcon } from "lucide-react"; import { Input, type InputProps } from "../ui/input"; import { Button } from "../ui/button"; -interface ToggleVisibilityInputProps extends InputProps { - value: string | undefined; -} - -export const ToggleVisibilityInput = ({ - value, - ...props -}: ToggleVisibilityInputProps) => { +export const ToggleVisibilityInput = ({ ...props }: InputProps) => { const [isPasswordVisible, setIsPasswordVisible] = useState(false); const togglePasswordVisibility = () => { @@ -20,7 +13,7 @@ export const ToggleVisibilityInput = ({ const inputType = isPasswordVisible ? "text" : "password"; return (