@@ -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
0 commit comments