wip
This commit is contained in:
36
Workouts Watch App/Views/Workouts/WorkoutCardView.swift
Normal file
36
Workouts Watch App/Views/Workouts/WorkoutCardView.swift
Normal file
@ -0,0 +1,36 @@
|
||||
//
|
||||
// WorkoutCardView.swift
|
||||
// Workouts
|
||||
//
|
||||
// Created by rzen on 7/22/25 at 9:54 PM.
|
||||
//
|
||||
// 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)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user