Skip to content

Instantly share code, notes, and snippets.

@paulweichhart
Created October 7, 2020 13:36
Show Gist options
  • Save paulweichhart/fde28aa3b57e09e699b559bee34b23b7 to your computer and use it in GitHub Desktop.
Save paulweichhart/fde28aa3b57e09e699b559bee34b23b7 to your computer and use it in GitHub Desktop.
struct PortfolioList: View {
let symbols: [Symbol]
@EnvironmentObject private var coordinator: Coordinator
var body: some View {
List {
ForEach(symbols, id: \.id) { symbol in
NavigationLink(destination: coordinator.navigate(to: .shareView(symbol: symbol))) {
VStack(alignment: .leading) {
Text(symbol.id.localizedUppercase)
.bold()
Text(symbol.title).foregroundColor(Color.gray.opacity(0.7))
}.padding(EdgeInsets(top: 8, leading: 0, bottom: 8, trailing: 0))
}
}
}
.padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 16))
.listStyle(PlainListStyle())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment