From c5233d15594d3455c7dea91d62db57391e479c04 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Wed, 13 Apr 2022 10:04:29 -0700 Subject: [PATCH] adjust add label button styling --- .../Sources/App/Views/Home/HomeFeedViewIOS.swift | 1 + apple/OmnivoreKit/Sources/Views/TextChip.swift | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index 611979fc9..f6e31a5ed 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -128,6 +128,7 @@ import Views } Spacer() } + .padding(.bottom, 5) .padding(.horizontal) .sheet(isPresented: $showLabelsSheet) { ApplyLabelsView(mode: .list(viewModel.selectedLabels)) { labels in diff --git a/apple/OmnivoreKit/Sources/Views/TextChip.swift b/apple/OmnivoreKit/Sources/Views/TextChip.swift index 3fcd16e12..79e64e67e 100644 --- a/apple/OmnivoreKit/Sources/Views/TextChip.swift +++ b/apple/OmnivoreKit/Sources/Views/TextChip.swift @@ -33,7 +33,7 @@ public struct TextChip: View { public struct TextChipButton: View { public static func makeAddLabelButton(onTap: @escaping () -> Void) -> TextChipButton { - TextChipButton(title: "Label Filter", color: .appYellow48, actionType: .add, onTap: onTap) + TextChipButton(title: "Labels", color: Color(.systemGray6), actionType: .show, onTap: onTap) } public static func makeShowOptionsButton(title: String, onTap: @escaping () -> Void) -> TextChipButton { @@ -74,6 +74,12 @@ public struct TextChipButton: View { self.color = color self.onTap = onTap self.actionType = actionType + self.foregroundColor = { + if actionType == .show { + return .appGrayText + } + return color.isDark ? .white : .black + }() } let text: String @@ -81,6 +87,7 @@ public struct TextChipButton: View { let onTap: () -> Void let actionType: ActionType let cornerRadius = 20.0 + let foregroundColor: Color public var body: some View { Button(action: onTap) { @@ -91,7 +98,7 @@ public struct TextChipButton: View { .padding(.horizontal, 10) .padding(.vertical, 5) .font(.appFootnote) - .foregroundColor(color.isDark ? .white : .black) + .foregroundColor(foregroundColor) .lineLimit(1) .background(color) .cornerRadius(cornerRadius)