- send button disable/enable logic - `clear` button of the address field removed
This commit is contained in:
parent
6c77e0901b
commit
effa4b304a
|
@ -48,6 +48,8 @@ struct CreateTransaction: View {
|
||||||
label: { Text(L10n.General.send) }
|
label: { Text(L10n.General.send) }
|
||||||
)
|
)
|
||||||
.activeButtonStyle
|
.activeButtonStyle
|
||||||
|
.disabled(viewStore.isValidForm)
|
||||||
|
.opacity(viewStore.isValidForm ? 1.0 : 0.5)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,8 @@ struct TransactionAddressTextField: View {
|
||||||
state: \.textFieldState,
|
state: \.textFieldState,
|
||||||
action: TransactionAddressTextFieldReducer.Action.textField
|
action: TransactionAddressTextFieldReducer.Action.textField
|
||||||
),
|
),
|
||||||
titleAccessoryView: {
|
titleAccessoryView: { },
|
||||||
if !viewStore.textFieldState.text.data.isEmpty {
|
inputPrefixView: { },
|
||||||
Button(
|
|
||||||
action: {
|
|
||||||
viewStore.send(.clearAddress)
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
Text(L10n.General.clear)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.textFieldTitleAccessoryButtonStyle
|
|
||||||
}
|
|
||||||
},
|
|
||||||
inputPrefixView: { EmptyView() },
|
|
||||||
inputAccessoryView: {
|
inputAccessoryView: {
|
||||||
Button {
|
Button {
|
||||||
viewStore.send(.scanQR)
|
viewStore.send(.scanQR)
|
||||||
|
|
Loading…
Reference in New Issue