Set proper variables for text inputs
This commit is contained in:
parent
27adc0bc5a
commit
953a064de6
@ -11,27 +11,45 @@ struct AddEntryView: View {
|
||||
@State private var t1: String = ""
|
||||
@State private var t2: String = ""
|
||||
|
||||
@State private var Odometer = ""
|
||||
@State private var CostPerLitre = ""
|
||||
@State private var Litres = ""
|
||||
@State private var TotalCost = ""
|
||||
@State private var FuelType = ""
|
||||
@State private var Location = ""
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
Form {
|
||||
HStack() {
|
||||
Text("Last: \(72398)")
|
||||
Divider()
|
||||
TextField("Odometer", text: $t1)
|
||||
TextField("Odometer", text: $Odometer)
|
||||
|
||||
}
|
||||
|
||||
HStack {
|
||||
TextField("Cost/L", text: $t1)
|
||||
TextField("Cost/L", text: $CostPerLitre)
|
||||
Divider()
|
||||
TextField("Litres", text: $t1)
|
||||
TextField("Litres", text: $Litres)
|
||||
Divider()
|
||||
TextField("Total Cost", text: $t1)
|
||||
TextField("Total Cost", text: $TotalCost)
|
||||
}
|
||||
|
||||
TextField("Fuel Type", text: $t1)
|
||||
TextField("Fuel Type", text: $FuelType)
|
||||
TextField("Location", text: $Location)
|
||||
}
|
||||
.navigationTitle("New Entry")
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button("Cancel") {}
|
||||
}
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
Button("Confirm") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user