create highlight list card
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
import Models
|
||||
import SwiftUI
|
||||
|
||||
struct HighlightsListCard: View {
|
||||
let highlight: Highlight
|
||||
|
||||
var body: some View {
|
||||
Text(highlight.quote ?? "no quote")
|
||||
}
|
||||
}
|
||||
@ -14,11 +14,12 @@ struct HighlightsListView: View {
|
||||
List {
|
||||
Section {
|
||||
ForEach(viewModel.highlights, id: \.self) { highlight in
|
||||
Text(highlight.quote ?? "no quote")
|
||||
HighlightsListCard(highlight: highlight)
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("Highlights")
|
||||
.listStyle(PlainListStyle())
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
|
||||
Reference in New Issue
Block a user