Skip to content

Commit 37b2cc6

Browse files
committed
Replace clear CTA in cart view with POSButtonStyle. Remove unused button constants.
1 parent f0cb8d1 commit 37b2cc6

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

WooCommerce/Classes/POS/Presentation/CartView.swift

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,8 @@ struct CartView: View {
5151
} label: {
5252
Text(Localization.clearButtonTitle)
5353
.font(Constants.clearButtonFont)
54-
.padding(Constants.clearButtonTextPadding)
55-
.foregroundColor(Color.init(uiColor: .wooCommercePurple(.shade60)))
56-
.overlay(
57-
RoundedRectangle(cornerRadius: Constants.clearButtonCornerRadius)
58-
.stroke(Color.init(uiColor: .wooCommercePurple(.shade60)), lineWidth: Constants.clearButtonBorderWidth)
59-
)
6054
}
61-
.padding(.leading, Constants.itemHorizontalPadding)
55+
.buttonStyle(POSButtonStyle(variant: .outlined, size: .extraSmall))
6256
.renderedIf(shouldShowClearCartButton)
6357
}
6458
}
@@ -208,9 +202,6 @@ private extension CartView {
208202
static let secondaryFont: POSFontStyle = .posBodyRegular
209203
static let itemsFont: POSFontStyle = .posDetailRegular
210204
static let clearButtonFont: POSFontStyle = .posDetailEmphasized
211-
static let clearButtonCornerRadius: CGFloat = 4
212-
static let clearButtonBorderWidth: CGFloat = 2
213-
static let clearButtonTextPadding = EdgeInsets(top: 8, leading: 24, bottom: 8, trailing: 24)
214205
static let itemHorizontalPadding: CGFloat = 8
215206
static let shoppingBagImageSize: CGFloat = 104
216207
static let scrollViewCoordinateSpaceIdentifier: String = "CartScrollView"

WooCommerce/Classes/POS/Presentation/PointOfSaleCollectCashView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ private extension PointOfSaleCollectCashView {
167167
static let navigationButtonSpacing: CGFloat = 8
168168
static let navigationHeaderTopPadding: CGFloat = 8
169169
static let buttonFont: POSFontStyle = .posBodyEmphasized
170-
static let buttonCornerRadius: CGFloat = 8
171170
static let errorMessagePadding: CGFloat = 8
172171
}
173172

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ struct POSSendReceiptView: View {
116116
private extension POSSendReceiptView {
117117
enum Constants {
118118
static let buttonSpacing: CGFloat = 12
119-
static let buttonPadding: CGFloat = 32
120119
static let buttonFont: POSFontStyle = .posBodyEmphasized
121-
static let buttonCornerRadius: CGFloat = 8
122120
static let errorMessagePadding: CGFloat = 8
123121
}
124122

0 commit comments

Comments
 (0)