Gastrack/gastrack/AddEntryView.swift
2025-02-23 23:20:22 +13:00

49 lines
1.1 KiB
Swift

//
// AddEntryView.swift
// gastrack
//
// Created by Pradyun Setti on 23/02/2025.
//
import SwiftUI
struct AddEntryView: View {
@State private var t1: String = ""
@State private var t2: String = ""
var body: some View {
NavigationView {
Form {
HStack() {
Text("Last: \(72398)")
Divider()
TextField("Odometer", text: $t1)
}
HStack {
TextField("Cost/L", text: $t1)
Divider()
TextField("Litres", text: $t1)
Divider()
TextField("Total Cost", text: $t1)
}
TextField("Fuel Type", text: $t1)
}
.navigationTitle("New Entry")
}
}
}
#Preview {
NavigationView {
Text("s")
.sheet(isPresented: Binding(get: {true}, set: {_ in})) {
AddEntryView()
.presentationDetents([.medium])
.presentationCornerRadius(20)
}
}
}