37 lines
913 B
Swift
37 lines
913 B
Swift
//
|
|
// InfoView.swift
|
|
// Werkout_ios
|
|
//
|
|
// Created by Trey Tartt on 7/7/23.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct InfoView: View {
|
|
@ObservedObject var bridgeModule = BridgeModule.shared
|
|
var workout: Workout
|
|
|
|
var body: some View {
|
|
VStack {
|
|
if bridgeModule.isInWorkout == false {
|
|
Text(workout.name)
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.font(.title3)
|
|
.padding()
|
|
if let desc = workout.description {
|
|
Text(desc)
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.font(.body)
|
|
.padding([.leading, .trailing])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
struct InfoView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
InfoView(workout: PreviewData.workout())
|
|
}
|
|
}
|