Skip to content

Commit

Permalink
[ABW-2103] Tap to dismiss keyboard in Default Deposit Guarantees (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
kugel3 committed Aug 29, 2023
1 parent a4a2303 commit 728d145
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ extension DefaultDepositGuarantees {
public struct View: SwiftUI.View {
private let store: Store

@FocusState
private var focused: Bool

public init(store: Store) {
self.store = store
}
Expand All @@ -21,17 +24,24 @@ extension DefaultDepositGuarantees.View {
Text("Set the guaranteed minimum deposit to be applied whenever a deposit in a transaction can only be estimated.\n\nYou can always change the guarantee from this default in each transaction.") // FIXME: Strings
.textStyle(.body1HighImportance)
.foregroundColor(.app.gray2)
.allowsHitTesting(false)

Card {
let stepperStore = store.scope(state: \.percentageStepper) { .child(.percentageStepper($0)) }
MinimumPercentageStepper.View(store: stepperStore, vertical: true)
.focused($focused)
.padding(.medium3)
}

Spacer(minLength: 0)
}
.padding(.medium3)
.background(.app.gray5)
.background {
Color.app.gray5
.onTapGesture {
focused = false
}
}
.navigationTitle("Deposit Guarantees") // FIXME: Strings - title
}
}

0 comments on commit 728d145

Please sign in to comment.