Skip to content

Commit afb67ef

Browse files
committed
Misc cart color updates.
1 parent f507471 commit afb67ef

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

WooCommerce/Classes/POS/Presentation/CartView.swift

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ struct CartView: View {
77

88
@Environment(\.floatingControlAreaSize) var floatingControlAreaSize: CGSize
99
@Environment(\.dynamicTypeSize) var dynamicTypeSize
10-
@Environment(\.colorScheme) var colorScheme
1110

1211
@State private var offSetPosition: CGFloat = 0.0
1312
private var coordinateSpace: CoordinateSpace = .named(Constants.scrollViewCoordinateSpaceIdentifier)
@@ -36,7 +35,7 @@ struct CartView: View {
3635
if let itemsInCartLabel = viewHelper.itemsInCartLabel(for: posModel.cart.count) {
3736
Text(itemsInCartLabel)
3837
.font(Constants.itemsFont)
39-
.foregroundColor(Color.posSecondaryText)
38+
.foregroundColor(Color.posOnSurfaceVariantLowest)
4039
}
4140
}
4241
.accessibilityElement(children: .combine)
@@ -271,7 +270,7 @@ private extension CartView {
271270
} label: {
272271
Image(systemName: Constants.backButtonSymbol)
273272
.font(.posBodyEmphasized, maximumContentSizeCategory: .accessibilityLarge)
274-
.foregroundColor(.primary)
273+
.foregroundColor(.posOnSurface)
275274
}
276275
}
277276
}
@@ -319,4 +318,20 @@ private extension CartView {
319318
return CartView()
320319
.environment(posModel)
321320
}
321+
322+
@available(iOS 17.0, *)
323+
#Preview("Cart with one item") {
324+
let itemsController = PointOfSalePreviewItemsController()
325+
let posModel = PointOfSaleAggregateModel(
326+
itemsController: PointOfSalePreviewItemsController(),
327+
cardPresentPaymentService: CardPresentPaymentPreviewService(),
328+
orderController: PointOfSalePreviewOrderController())
329+
posModel.addToCart(.simpleProduct(.init(id: UUID(),
330+
name: "Sample Product",
331+
formattedPrice: "$10.00",
332+
productID: 6,
333+
price: "10")))
334+
return CartView()
335+
.environment(posModel)
336+
}
322337
#endif

WooCommerce/Classes/POS/Presentation/Item Selector/ChildItemList.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private extension ChildItemList {
5151
} label: {
5252
Image(systemName: "chevron.backward")
5353
.font(.posBodyEmphasized, maximumContentSizeCategory: .accessibilityLarge)
54-
.foregroundColor(.primary)
54+
.foregroundColor(.posOnSurface)
5555
}
5656
POSHeaderTitleView(title: title)
5757
Spacer()

0 commit comments

Comments
 (0)