From 467bf28bbcf906d23ccdabfe5600f3766128905f Mon Sep 17 00:00:00 2001 From: Alexey Sidorov Date: Wed, 26 Jul 2023 11:12:10 +0200 Subject: [PATCH] Textfield fix --- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- .../Subviews/StrigaRegistrationTextField.swift | 5 ++++- .../Scenes/Main/BankTransfer/Withdraw/WithdrawView.swift | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index e186c115a7..c6d7b75310 100644 --- a/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/p2p_wallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -303,8 +303,8 @@ "repositoryURL": "https://github.com/google/promises.git", "state": { "branch": null, - "revision": "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", - "version": "2.3.1" + "revision": "c22f76b709dc4bb6d274398259e75c191e50998a", + "version": "2.3.0" } }, { diff --git a/p2p_wallet/Scenes/Main/BankTransfer/StrigaRegistration/Subviews/StrigaRegistrationTextField.swift b/p2p_wallet/Scenes/Main/BankTransfer/StrigaRegistration/Subviews/StrigaRegistrationTextField.swift index dcab52724a..0b6c67754c 100644 --- a/p2p_wallet/Scenes/Main/BankTransfer/StrigaRegistration/Subviews/StrigaRegistrationTextField.swift +++ b/p2p_wallet/Scenes/Main/BankTransfer/StrigaRegistration/Subviews/StrigaRegistrationTextField.swift @@ -4,6 +4,7 @@ import KeyAppUI struct StrigaRegistrationTextField: View { let field: TextFieldType + let fontStyle: UIFont.Style let placeholder: String let isEnabled: Bool let onSubmit: () -> Void @@ -17,6 +18,7 @@ struct StrigaRegistrationTextField: View init( field: TextFieldType, + fontStyle: UIFont.Style = .title2, placeholder: String, text: Binding, isEnabled: Bool = true, @@ -26,6 +28,7 @@ struct StrigaRegistrationTextField: View submitLabel: SubmitLabel ) { self.field = field + self.fontStyle = fontStyle self.placeholder = placeholder self._text = text self.isEnabled = isEnabled @@ -41,7 +44,7 @@ struct StrigaRegistrationTextField: View guard editing else { return } focus = field }) - .font(uiFont: .font(of: .title2)) + .font(uiFont: .font(of: fontStyle)) .foregroundColor(isEnabled ? Color(asset: Asset.Colors.night) : Color(asset: Asset.Colors.night).opacity(0.3)) .padding(EdgeInsets(top: 14, leading: 16, bottom: 14, trailing: 20)) .frame(height: 58) diff --git a/p2p_wallet/Scenes/Main/BankTransfer/Withdraw/WithdrawView.swift b/p2p_wallet/Scenes/Main/BankTransfer/Withdraw/WithdrawView.swift index ed66621102..abc55e1426 100644 --- a/p2p_wallet/Scenes/Main/BankTransfer/Withdraw/WithdrawView.swift +++ b/p2p_wallet/Scenes/Main/BankTransfer/Withdraw/WithdrawView.swift @@ -57,6 +57,7 @@ struct WithdrawView: View { ) { StrigaRegistrationTextField( field: .IBAN, + fontStyle: .text3, placeholder: "", text: $viewModel.IBAN, showClearButton: true, @@ -72,6 +73,7 @@ struct WithdrawView: View { ) { StrigaRegistrationTextField( field: .BIC, + fontStyle: .text3, placeholder: "", text: $viewModel.BIC, showClearButton: true, @@ -87,6 +89,7 @@ struct WithdrawView: View { status: .valid) { StrigaRegistrationTextField( field: .receiver, + fontStyle: .text3, placeholder: "", text: $viewModel.receiver, isEnabled: false,