From 2647f5836c689f79464ce0e06125a4f11ab7ec58 Mon Sep 17 00:00:00 2001 From: Aakiyaru Date: Tue, 27 May 2025 18:45:06 +0700 Subject: [PATCH] fix --- .../CustomTextField/CustomTextField.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Sources/UIKitComponents/CustomTextField/CustomTextField.swift b/Sources/UIKitComponents/CustomTextField/CustomTextField.swift index e2dbe1c..0414d78 100644 --- a/Sources/UIKitComponents/CustomTextField/CustomTextField.swift +++ b/Sources/UIKitComponents/CustomTextField/CustomTextField.swift @@ -95,11 +95,13 @@ public struct CustomTextField: View { .lineSpacing(20) } Spacer() - if security { - Button { - eye.toggle() - } label: { - Image(!eye ? "EyeClose" : "EyeOpen", bundle: .module) + if !text.isEmpty { + if security { + Button { + eye.toggle() + } label: { + Image(!eye ? "EyeClose" : "EyeOpen", bundle: .module) + } } } }.padding(.horizontal, 14) @@ -114,5 +116,5 @@ public struct CustomTextField: View { } #Preview { - CustomTextField(titleKey: "",security: true , text: .constant("")) + CustomTextField(titleKey: "",security: true , text: .constant("dwed")) }