Skip to content

Commit 4ea394f

Browse files
committed
update modal header linelimit when larger sizes
When the header contains longer text that fits on screen, is cut to max 1 line only, we can remove the limit for larger sizes so all text is visible
1 parent a73a7fb commit 4ea394f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

WooCommerce/Classes/POS/Presentation/PointOfSaleModalHeader.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import SwiftUI
22

33
struct PointOfSaleModalHeader: View {
4+
@Environment(\.dynamicTypeSize) private var dynamicTypeSize
5+
46
@Binding var isPresented: Bool
57
@Binding var title: AttributedString
68

79
var body: some View {
810
HStack {
911
Text(title)
1012
.font(.posHeadingBold)
11-
.lineLimit(1)
13+
.dynamicTypeSize(...DynamicTypeSize.accessibility2)
14+
.lineLimit(dynamicTypeSize.isAccessibilitySize ? nil : 1)
1215
Spacer()
1316
Button {
1417
isPresented = false

0 commit comments

Comments
 (0)