@@ -6,6 +6,21 @@ struct PointOfSaleOrderSyncCouponsErrorMessageView: View {
66 let retryHandler : ( ) -> Void
77
88 @Environment ( PointOfSaleAggregateModel . self) private var posModel
9+ @Environment ( \. dynamicTypeSize) var dynamicTypeSize
10+
11+ private var attributedMessage : AttributedString {
12+ if let data = message. data ( using: . utf8) ,
13+ let nsAttributedString = try ? NSAttributedString (
14+ data: data,
15+ options: [ . documentType: NSAttributedString . DocumentType. html] ,
16+ documentAttributes: nil ) {
17+ var attributedString = AttributedString ( nsAttributedString)
18+ attributedString. font = POSFontStyle . posBodyLargeRegular ( ) . font ( )
19+ attributedString. foregroundColor = UIColor ( Color . posOnSurface)
20+ return attributedString
21+ }
22+ return AttributedString ( message)
23+ }
924
1025 var body : some View {
1126 HStack ( alignment: . center) {
@@ -19,9 +34,7 @@ struct PointOfSaleOrderSyncCouponsErrorMessageView: View {
1934 . foregroundStyle ( Color . posOnSurface)
2035 . font ( . posHeadingBold)
2136
22- Text ( message)
23- . foregroundStyle ( Color . posOnSurface)
24- . font ( . posBodyLargeRegular( ) )
37+ Text ( attributedMessage)
2538 . padding ( [ . leading, . trailing] )
2639 }
2740 Spacer ( ) . frame ( height: PointOfSaleCardPresentPaymentLayout . textAndButtonSpacing)
0 commit comments