Mercurial > public > lazybear
comparison LazyBear/Views/Company/Helpers/InsiderTransactionsHelper.swift @ 447:8621ba6fd457
Fixes #48
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Wed, 23 Jun 2021 10:54:47 +0200 |
parents | 7d1c4dc8d1d8 |
children | c6913f0ce46e |
comparison
equal
deleted
inserted
replaced
446:9cc0455bc46f | 447:8621ba6fd457 |
---|---|
17 Text("Insider Transactions") | 17 Text("Insider Transactions") |
18 .font(.title) | 18 .font(.title) |
19 .fontWeight(.semibold) | 19 .fontWeight(.semibold) |
20 | 20 |
21 Spacer() | 21 Spacer() |
22 Button("See all", action: { showList = true } ) | 22 NavigationLink(destination: InsiderTransactionsList(insiderTransactions: insiderTransactions) |
23 .navigationTitle("Insider Transactions") | |
24 .navigationBarTitleDisplayMode(.large) | |
25 ) { | |
26 Text("See all") | |
27 .accentColor(Color(.systemBlue)) | |
28 } | |
23 } | 29 } |
24 .padding(.bottom) | 30 .padding(.bottom) |
25 | 31 |
26 ForEach(insiderTransactions.prefix(4), id: \.self) { insiderTransaction in | 32 ForEach(insiderTransactions.prefix(4), id: \.self) { insiderTransaction in |
27 InsiderTransactionsRow(insiderTransaction: insiderTransaction) | 33 InsiderTransactionsRow(insiderTransaction: insiderTransaction) |
30 } | 36 } |
31 .padding() | 37 .padding() |
32 .background( | 38 .background( |
33 CustomRectangleBox() | 39 CustomRectangleBox() |
34 ) | 40 ) |
35 .sheet(isPresented: $showList) { | |
36 InsiderTransactionsList(insiderTransactions: insiderTransactions, isPresented: $showList) | |
37 } | |
38 } | 41 } |
39 } | 42 } |
40 | 43 |
41 struct InsiderTransactionsHelper_Previews: PreviewProvider { | 44 struct InsiderTransactionsHelper_Previews: PreviewProvider { |
42 static var previews: some View { | 45 static var previews: some View { |