This commit is contained in:
2025-07-19 16:42:47 -04:00
parent 6e46775f58
commit e3c3f2c6f0
38 changed files with 556 additions and 367 deletions

View File

@ -0,0 +1,57 @@
//
// ListItem.swift
// Workouts
//
// Created by rzen on 7/13/25 at 10:42AM.
//
// Copyright 2025 Rouslan Zenetl. All Rights Reserved.
//
import SwiftUI
struct ListItem: View {
var title: String?
var text: String?
var subtitle: String?
var count: Int?
// var badges: [Badge]? = []
var body: some View {
HStack {
VStack (alignment: .leading) {
if let title = title {
Text("\(title)")
.font(.headline)
if let text = text {
Text("\(text)")
.font(.footnote)
}
} else {
if let text = text {
Text("\(text)")
}
}
HStack (alignment: .bottom) {
// if let badges = badges {
// ForEach (badges, id: \.self) { badge in
// BadgeView(badge: badge)
// }
// }
if let subtitle = subtitle {
Text("\(subtitle)")
.font(.footnote)
}
}
}
if let count = count {
Spacer()
Text("\(count)")
.font(.caption)
.foregroundColor(.gray)
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
}
}