File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
WooCommerce/Classes/POS/Presentation/Settings Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -92,11 +92,17 @@ extension PointOfSaleSettingsView {
9292
9393struct PointOfSaleSettingsCard : View {
9494 @Environment ( \. dynamicTypeSize) private var dynamicTypeSize
95+ @Environment ( \. colorScheme) private var colorScheme
9596
9697 let item : PointOfSaleSettingsView . SidebarNavigation
9798 let isSelected : Bool
9899 let onTap : ( ) -> Void
99100
101+ private var selectionBackgroundColor : Color {
102+ guard isSelected else { return Color . clear }
103+ return colorScheme == . dark ? Color . posPrimary : Color . posSecondary
104+ }
105+
100106 var body : some View {
101107 Button ( action: onTap) {
102108 HStack ( spacing: POSSpacing . medium) {
@@ -126,7 +132,7 @@ struct PointOfSaleSettingsCard: View {
126132 . accessibilityAddTraits ( . isButton)
127133 . background (
128134 RoundedRectangle ( cornerRadius: POSCornerRadiusStyle . small. value, style: . continuous)
129- . fill ( isSelected ? Color . posSecondary : Color . clear )
135+ . fill ( selectionBackgroundColor )
130136 )
131137 }
132138}
You can’t perform that action at this time.
0 commit comments