This commit is contained in:
Aakiyaru 2025-05-27 18:45:06 +07:00
parent 5942de1eea
commit 2647f5836c

View File

@ -95,11 +95,13 @@ public struct CustomTextField: View {
.lineSpacing(20) .lineSpacing(20)
} }
Spacer() Spacer()
if security { if !text.isEmpty {
Button { if security {
eye.toggle() Button {
} label: { eye.toggle()
Image(!eye ? "EyeClose" : "EyeOpen", bundle: .module) } label: {
Image(!eye ? "EyeClose" : "EyeOpen", bundle: .module)
}
} }
} }
}.padding(.horizontal, 14) }.padding(.horizontal, 14)
@ -114,5 +116,5 @@ public struct CustomTextField: View {
} }
#Preview { #Preview {
CustomTextField(titleKey: "",security: true , text: .constant("")) CustomTextField(titleKey: "",security: true , text: .constant("dwed"))
} }