-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSummaryView.swift
52 lines (45 loc) · 1.67 KB
/
SummaryView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// SummaryView.swift
// Challenge14
//
// Created by Kushal P on 1/16/21.
//
import SwiftUI
struct SummaryView: View{
@State private var isPresented = false
@State private var seasonData: SeasonModel.SeasonData = SeasonModel.SeasonData(category: SeasonModel.SeasonData.Category.spring)
@State private var newAttendee = ""
@Environment(\.presentationMode) var presentationMode
var body: some View {
NavigationView {
List{
Section(header: Text("Your Order Summary")){
TextField("Season Selected", text: $seasonData.name)
TextField("Issues Selected", text: $seasonData.name)
TextField("Recording Selected", text: $seasonData.name)
}
Section(header: Text("COMMENTS")) {
Text("Category")
}
HStack {
TextField("Additional Comments", text: $newAttendee)
Button(action: {
}) {
Image(systemName: "plus.circle.fill")
.accessibilityLabel(Text("Add Additional Comments"))
}
.disabled(newAttendee.isEmpty)
}
}
.listStyle(InsetGroupedListStyle())
.navigationBarItems(trailing: Button("Cancel") {
presentationMode.wrappedValue.dismiss()
})
}
}
}
struct SummaryView_Previews: PreviewProvider {
static var previews: some View {
SummaryView()
}
}