// // EntryCardView.swift // gastrack // // Created by Pradyun Setti on 24/02/2025. // import SwiftUI struct EntryCardView: View { let entry: Entry var body: some View { HStack { VStack(alignment: .leading) { Text(entry.getFormattedDate()) .font(.system(.caption, design: .default, weight: .medium)) Text(String(format: "$%.2f", entry.cost)) .font(.system(.headline, design: .default, weight: .bold)) .foregroundStyle(.green) Text(String(format: "%.3f L", entry.quantity)) } Spacer() } .padding() .background(Color.secondary.opacity(0.3)) .clipShape(RoundedRectangle(cornerRadius: 12)) .padding(.horizontal) } } //#Preview { // EntryCardView() //}