AutoCat2/AutoCat2SUI/Views/PlateView/PlateViewItem.swift

47 lines
1.2 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// PlateViewItem.swift
// AutoCat2SUI
//
// Created by Selim Mustafaev on 04.09.2022.
//
import SwiftUI
import AutoCatCore
struct PlateViewItem: View {
let vehicle: Vehicle
var body: some View {
VStack(alignment: .leading, spacing: 4) {
Text(vehicle.brand?.name?.original ?? "")
HStack {
PlateNumberView(number: PlateNumber(vehicle.number),
unrecognized: vehicle.unrecognized,
outdated: vehicle.outdated,
fontSize: 30)
VStack {
// if let upDate = vehicle.updatedDate {
//
// }
}
}
}
.padding(.vertical, 2)
}
}
struct PlateViewItem_Previews: PreviewProvider {
static var previews: some View {
let test1 = Vehicle(number: "Н282СН61",
brandName: "KIA ОПТИМА",
addedDate: Date().timeIntervalSince1970,
updatedDate: Date().timeIntervalSince1970)
return PlateViewItem(vehicle: test1)
}
}