mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
adjust add label button styling
This commit is contained in:
parent
567f3dedad
commit
c5233d1559
2 changed files with 10 additions and 2 deletions
|
|
@ -128,6 +128,7 @@ import Views
|
|||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(.bottom, 5)
|
||||
.padding(.horizontal)
|
||||
.sheet(isPresented: $showLabelsSheet) {
|
||||
ApplyLabelsView(mode: .list(viewModel.selectedLabels)) { labels in
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue