Skip to content

Commit f5dd848

Browse files
committed
Embed attendance status selector view content in scroll view
1 parent 572da7c commit f5dd848

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

WooCommerce/Classes/ViewRelated/Bookings/Booking Details/UpdateAttendanceStatusView.swift

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,38 @@ struct UpdateAttendanceStatusView: View {
1010
}
1111

1212
var body: some View {
13-
VStack(alignment: .leading, spacing: 24) {
14-
Text(Localization.title)
15-
.font(.subheadline.weight(.medium))
16-
.foregroundColor(.secondary)
17-
.padding(.horizontal)
13+
ScrollView {
14+
VStack(alignment: .leading, spacing: 24) {
15+
Text(Localization.title)
16+
.font(.subheadline.weight(.medium))
17+
.foregroundColor(.secondary)
18+
.padding(.horizontal)
1819

19-
ForEach(statuses) { status in
20-
HStack(spacing: 16) {
21-
Image(systemName: status.iconName)
22-
.font(.title3.weight(.medium))
23-
.foregroundStyle(Color(.systemGray))
24-
VStack(alignment: .leading, spacing: 4) {
25-
Text(status.title)
26-
.font(.body.weight(.medium))
27-
Text(status.description)
28-
.font(.subheadline)
29-
.foregroundColor(.secondary)
20+
ForEach(statuses) { status in
21+
HStack(alignment: .top, spacing: 16) {
22+
Image(systemName: status.iconName)
23+
.font(.title3.weight(.medium))
24+
.foregroundStyle(Color(.systemGray))
25+
VStack(alignment: .leading, spacing: 4) {
26+
Text(status.title)
27+
.font(.body.weight(.medium))
28+
.fixedSize(horizontal: false, vertical: true)
29+
Text(status.description)
30+
.font(.subheadline)
31+
.foregroundColor(.secondary)
32+
.fixedSize(horizontal: false, vertical: true)
33+
}
34+
}
35+
.padding(.horizontal)
36+
.contentShape(Rectangle())
37+
.tappable {
38+
onStatusSelected(status)
39+
dismiss()
3040
}
31-
}
32-
.padding(.horizontal)
33-
.contentShape(Rectangle())
34-
.tappable {
35-
onStatusSelected(status)
36-
dismiss()
3741
}
3842
}
39-
Spacer()
43+
.padding(.top)
4044
}
41-
.padding(.top)
4245
}
4346
}
4447

0 commit comments

Comments
 (0)