Mercurial > public > lazybear
comparison LazyBear/Views/Company/Helpers/InsiderRosterList.swift @ 445:7d1c4dc8d1d8
Change presentationMode to Binding
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Tue, 22 Jun 2021 19:56:59 +0200 |
parents | ffbb1dbab531 |
children | 8621ba6fd457 |
comparison
equal
deleted
inserted
replaced
444:428109b1e3f0 | 445:7d1c4dc8d1d8 |
---|---|
7 | 7 |
8 import SwiftUI | 8 import SwiftUI |
9 | 9 |
10 struct InsiderRosterList: View { | 10 struct InsiderRosterList: View { |
11 var insiderRoster: [InsiderRosterModel] | 11 var insiderRoster: [InsiderRosterModel] |
12 @Environment(\.presentationMode) private var insiderRosterListPresentation | 12 @Binding var isPresented: Bool |
13 | 13 |
14 var body: some View { | 14 var body: some View { |
15 NavigationView { | 15 NavigationView { |
16 ScrollView(showsIndicators: false) { | 16 ScrollView(showsIndicators: false) { |
17 VStack { | 17 VStack { |
25 .padding() | 25 .padding() |
26 } | 26 } |
27 .navigationTitle("Top 10 Insiders") | 27 .navigationTitle("Top 10 Insiders") |
28 .toolbar { | 28 .toolbar { |
29 ToolbarItem(placement: .cancellationAction) { | 29 ToolbarItem(placement: .cancellationAction) { |
30 Button(action: { insiderRosterListPresentation.wrappedValue.dismiss() }) { | 30 Button(action: { self.isPresented.toggle() }) { |
31 Image(systemName: "multiply") | 31 Image(systemName: "multiply") |
32 } | 32 } |
33 } | 33 } |
34 } | 34 } |
35 } | 35 } |
45 entityName: "Tim Cook", | 45 entityName: "Tim Cook", |
46 position: 12345, | 46 position: 12345, |
47 reportDate: 12345 | 47 reportDate: 12345 |
48 ) | 48 ) |
49 ] | 49 ] |
50 , isPresented: .constant(true) | |
50 ) | 51 ) |
51 } | 52 } |
52 } | 53 } |