Skip to content

Commit 76e4f4e

Browse files
committed
update help view
1 parent 8a3b526 commit 76e4f4e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

WooCommerce/Classes/POS/Presentation/Settings/PointOfSaleSettingsHelpDetailView.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ struct PointOfSaleSettingsHelpDetailView: View {
55
@State private var showDocumentation = false
66
@State private var showSupport = false
77

8+
private var backgroundColor: Color {
9+
Color.posOnSecondaryContainer
10+
}
11+
812
var body: some View {
913
NavigationStack {
14+
POSPageHeaderView(title: Localization.helpTitle)
15+
.foregroundColor(.posSurface)
1016
List {
1117
Button {
1218
showProductRestrictions = true
@@ -23,6 +29,7 @@ struct PointOfSaleSettingsHelpDetailView: View {
2329
}
2430
}
2531
}
32+
.listRowSeparator(.hidden)
2633
.buttonStyle(.plain)
2734

2835
Button {
@@ -40,6 +47,7 @@ struct PointOfSaleSettingsHelpDetailView: View {
4047
}
4148
}
4249
}
50+
.listRowSeparator(.hidden)
4351
.buttonStyle(.plain)
4452

4553
Button {
@@ -57,8 +65,14 @@ struct PointOfSaleSettingsHelpDetailView: View {
5765
}
5866
}
5967
}
68+
.listRowSeparator(.hidden)
6069
.buttonStyle(.plain)
6170
}
71+
.listStyle(.plain)
72+
.scrollContentBackground(.hidden)
73+
.background(backgroundColor)
74+
.listRowBackground(Color.clear)
75+
.listRowSeparator(.hidden)
6276
}
6377
.posModal(isPresented: $showProductRestrictions) {
6478
// TODO: Remove copy on POSFloatingControlView.documentationView
@@ -86,6 +100,12 @@ private extension PointOfSaleSettingsHelpDetailView {
86100
}
87101

88102
enum Localization {
103+
static let helpTitle = NSLocalizedString(
104+
"PointOfSaleSettingsHelpDetailView.help.title",
105+
value: "Help",
106+
comment: "Navigation title for the help settings list."
107+
)
108+
89109
static let productRestrictionsInfo = NSLocalizedString(
90110
"PointOfSaleSettingsHelpDetailView.help.productRestrictionsInfo.button.title",
91111
value: "Where are my products?",
@@ -147,3 +167,9 @@ private extension PointOfSaleSettingsHelpDetailView {
147167
.navigationViewStyle(.stack)
148168
}
149169
}
170+
171+
#if DEBUG
172+
#Preview {
173+
PointOfSaleSettingsHelpDetailView()
174+
}
175+
#endif

0 commit comments

Comments
 (0)