Skip to content

Commit 4543378

Browse files
committed
Update spacing between elements in cash view.
1 parent e4e03e9 commit 4543378

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

WooCommerce/Classes/POS/Presentation/PointOfSaleCollectCashView.swift

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct PointOfSaleCollectCashView: View {
2626

2727
var body: some View {
2828
ScrollView {
29-
VStack(alignment: .center, spacing: conditionalPadding(8)) {
29+
VStack(alignment: .center, spacing: conditionalPadding(13)) {
3030
POSPageHeaderView(title: Localization.backNavigationTitle,
3131
subtitle: formattedOrderTotal,
3232
backButtonConfiguration: .init(state: isLoading ? .disabled: .enabled,
@@ -37,31 +37,33 @@ struct PointOfSaleCollectCashView: View {
3737
}
3838
}))
3939

40-
VStack(alignment: .center, spacing: conditionalPadding(8)) {
41-
FormattableAmountTextField(viewModel: textFieldViewModel, style: .pos)
42-
.focused($isTextFieldFocused)
43-
.dynamicTypeSize(...DynamicTypeSize.accessibility1)
44-
.onSubmit {
45-
Task { @MainActor in
46-
await submitCashAmount()
40+
VStack(alignment: .center, spacing: conditionalPadding(62)) {
41+
VStack(alignment: .center, spacing: conditionalPadding(4)) {
42+
FormattableAmountTextField(viewModel: textFieldViewModel, style: .pos)
43+
.focused($isTextFieldFocused)
44+
.dynamicTypeSize(...DynamicTypeSize.accessibility1)
45+
.onSubmit {
46+
Task { @MainActor in
47+
await submitCashAmount()
48+
}
49+
}
50+
.onChange(of: textFieldViewModel.amount) { newValue in
51+
textFieldAmountInput = newValue
52+
updateChangeDueMessage()
4753
}
48-
}
49-
.onChange(of: textFieldViewModel.amount) { newValue in
50-
textFieldAmountInput = newValue
51-
updateChangeDueMessage()
52-
}
5354

54-
if let changeDue = changeDueMessage {
55-
Text(changeDue)
56-
.font(.posBodySmallRegular())
57-
.foregroundColor(.posOnSurfaceVariantHighest)
58-
}
55+
if let changeDue = changeDueMessage {
56+
Text(changeDue)
57+
.font(.posBodySmallRegular())
58+
.foregroundColor(.posOnSurfaceVariantLowest)
59+
}
5960

60-
if let errorMessage = errorMessage {
61-
Text(errorMessage)
62-
.font(.posBodySmallRegular())
63-
.foregroundColor(.posError)
64-
.padding(.bottom, Constants.errorMessagePadding)
61+
if let errorMessage = errorMessage {
62+
Text(errorMessage)
63+
.font(.posBodySmallRegular())
64+
.foregroundColor(.posError)
65+
.padding(.bottom, Constants.errorMessagePadding)
66+
}
6567
}
6668

6769
Button(action: {

0 commit comments

Comments
 (0)