Files
workouts/Workouts Watch App/Views/Workouts/WorkoutCardView.swift
2025-08-08 21:09:11 -04:00

37 lines
957 B
Swift
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// WorkoutCardView.swift
// Workouts
//
// Created by rzen on 7/22/25 at 9:54PM.
//
// Copyright 2025 Rouslan Zenetl. All Rights Reserved.
//
import SwiftUI
struct WorkoutCardView: View {
let workout: Workout
var body: some View {
VStack(alignment: .leading) {
if let split = workout.split {
Image(systemName: split.systemImage)
.font(.system(size: 48))
.foregroundStyle(split.getColor())
} else {
Image(systemName: "dumbbell.fill")
.font(.system(size: 24))
.foregroundStyle(.gray)
}
Text(workout.split?.name ?? "Workout")
.font(.headline)
.foregroundStyle(.white)
Text("\(workout.statusName)~")
.font(.caption)
.foregroundStyle(Color.accentColor)
}
}
}