Skip to content

Commit 3a24acb

Browse files
committed
Move background color to a constant.
1 parent 3c4cac2 commit 3a24acb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ struct POSSettingsLocalCatalogDetailView: View {
44
// TODO: WOOMOB-1335 - implement full sync cellular data setting functionality
55
@State private var allowFullSyncOnCellular: Bool = true
66

7-
private var backgroundColor: Color {
8-
Color.posOnSecondaryContainer
9-
}
10-
117
var body: some View {
128
NavigationStack {
139
VStack(spacing: POSSpacing.none) {
@@ -22,7 +18,7 @@ struct POSSettingsLocalCatalogDetailView: View {
2218
manualCatalogUpdate
2319
}
2420
}
25-
.background(backgroundColor)
21+
.background(Style.backgroundColor)
2622
}
2723
}
2824
}
@@ -82,7 +78,7 @@ private extension POSSettingsLocalCatalogDetailView {
8278
@ViewBuilder
8379
func sectionHeaderView(title: String) -> some View {
8480
ZStack {
85-
backgroundColor
81+
Style.backgroundColor
8682
Text(title)
8783
.font(.posBodyLargeBold)
8884
.foregroundColor(.posOnSurface)
@@ -120,6 +116,10 @@ private extension POSSettingsLocalCatalogDetailView {
120116
}
121117

122118
private extension POSSettingsLocalCatalogDetailView {
119+
enum Style {
120+
static let backgroundColor = Color.posOnSecondaryContainer
121+
}
122+
123123
enum Localization {
124124
static let localCatalogTitle = NSLocalizedString(
125125
"posSettingsLocalCatalogDetailView.title",

0 commit comments

Comments
 (0)