Skip to content

Commit de7d76c

Browse files
committed
Replace ProgressView in cash and receipt views with POSFilledButtonStyle.
1 parent b17c011 commit de7d76c

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

WooCommerce/Classes/POS/Presentation/PointOfSaleCollectCashView.swift

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,10 @@ struct PointOfSaleCollectCashView: View {
7373
await submitCashAmount()
7474
}
7575
}, label: {
76-
if isLoading {
77-
ProgressView()
78-
.progressViewStyle(CircularProgressViewStyle())
79-
.tint(Color.posOnInverseSurface)
80-
} else {
81-
Text(Localization.markPaymentCompletedButtonTitle)
82-
.font(Constants.buttonFont)
83-
}
76+
Text(Localization.markPaymentCompletedButtonTitle)
77+
.font(Constants.buttonFont)
8478
})
85-
.buttonStyle(POSButtonStyle(variant: .filled, size: .normal))
79+
.buttonStyle(POSFilledButtonStyle(size: .normal, isLoading: isLoading))
8680
.frame(maxWidth: .infinity)
8781
.dynamicTypeSize(...DynamicTypeSize.accessibility1)
8882
.disabled(isLoading)

WooCommerce/Classes/POS/Presentation/Reusable Views/POSSendReceiptView.swift

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,10 @@ struct POSSendReceiptView: View {
6363
Button(action: {
6464
sendReceipt()
6565
}, label: {
66-
HStack(spacing: Constants.buttonSpacing) {
67-
if isLoading {
68-
ProgressView()
69-
.progressViewStyle(CircularProgressViewStyle())
70-
.tint(Color.posPrimaryText)
71-
} else {
72-
Text(Localization.buttonTitle)
73-
.font(Constants.buttonFont)
74-
}
75-
}
76-
.frame(maxWidth: .infinity)
66+
Text(Localization.buttonTitle)
67+
.font(Constants.buttonFont)
7768
})
78-
.buttonStyle(POSButtonStyle(variant: .filled, size: .normal))
69+
.buttonStyle(POSFilledButtonStyle(size: .normal, isLoading: isLoading))
7970
.dynamicTypeSize(...DynamicTypeSize.accessibility3)
8071
.frame(maxWidth: .infinity)
8172
.disabled(isLoading)

0 commit comments

Comments
 (0)