style highlights card

This commit is contained in:
Satindar Dhillon
2022-10-04 10:09:26 -07:00
parent 29d14b3e8d
commit 18760d9043
2 changed files with 49 additions and 2 deletions

View File

@ -2,9 +2,56 @@ import Models
import SwiftUI
struct HighlightsListCard: View {
@State var isContextMenuOpen = false
let highlight: Highlight
var contextMenuView: some View {
Group {
Button(
action: {},
label: { Label("Stubby One", systemImage: "highlighter") }
)
Button(
action: {},
label: { Label("Stubby Two", systemImage: "textbox") }
)
}
}
var body: some View {
Text(highlight.quote ?? "no quote")
VStack(alignment: .leading) {
HStack {
Image(systemName: "highlighter")
Text(highlight.shortId ?? "no short Id")
.font(.appHeadline)
.foregroundColor(.appGrayTextContrast)
.lineLimit(1)
Spacer()
Menu(
content: { contextMenuView },
label: {
Image(systemName: "ellipsis")
.foregroundColor(.appGrayTextContrast)
.padding()
}
)
.frame(width: 16, height: 16, alignment: .center)
.onTapGesture { isContextMenuOpen = true }
}
.padding(.top, 8)
HStack {
Divider()
.frame(width: 6)
.overlay(Color.appYellow48)
Text(highlight.quote ?? "")
}
.padding(.bottom, 8)
}
}
}

View File

@ -13,7 +13,7 @@ public enum FeatureFlag {
public static let enablePushNotifications = false
public static let enableShareButton = false
public static let enableSnooze = false
public static let enableGridCardsOnPhone = false
public static let enableGridCardsOnPhone = true
public static let enableTextToSpeechButton = true
public static let enableHighlightsView = true
}