mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
create highlight list card
This commit is contained in:
parent
397fb5d9f7
commit
29d14b3e8d
2 changed files with 12 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue