Skip to content

Commit 861fe56

Browse files
committed
Add new variable for icon color
1 parent ab11ef7 commit 861fe56

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

WooCommerce/Classes/ViewRelated/Hub Menu/HubMenuViewModel.swift

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,27 @@ extension HubMenuViewModel {
112112
var icon: UIImage {
113113
switch self {
114114
case .woocommerceAdmin:
115-
return .wordPressLogoImage.imageWithTintColor(.blue) ?? .wordPressLogoImage
115+
return .wordPressLogoImage
116116
case .viewStore:
117-
return .storeImage.imageWithTintColor(.accent) ?? .storeImage
117+
return .storeImage
118118
case .coupons:
119119
return .couponImage
120120
case .reviews:
121-
return .starImage(size: 24.0).imageWithTintColor(.primary) ?? .starImage(size: 24.0)
121+
return .starImage(size: 24.0)
122+
}
123+
}
124+
125+
var iconColor: UIColor {
126+
switch self {
127+
case .woocommerceAdmin:
128+
return .blue
129+
case .viewStore:
130+
return .accent
131+
case .coupons:
132+
return UIColor(light: .withColorStudio(.green, shade: .shade30),
133+
dark: .withColorStudio(.green, shade: .shade50))
134+
case .reviews:
135+
return .primary
122136
}
123137
}
124138
}

0 commit comments

Comments
 (0)