Files
WerkoutIOS/iphone/Werkout_ios/subview/AllWorkoutPickerView.swift
2024-06-18 12:03:56 -05:00

38 lines
1019 B
Swift

//
// AllWorkoutPickerView.swift
// Werkout_ios
//
// Created by Trey Tartt on 7/7/23.
//
import SwiftUI
struct AllWorkoutPickerView: View {
var mainViews: [MainViewTypes]
@Binding var selectedSegment: MainViewTypes
@StateObject var bridgeModule = BridgeModule.shared
var showCurrentWorkout: (() -> Void)
var body: some View {
HStack {
Picker("", selection: $selectedSegment) {
ForEach(mainViews, id: \.self) { viewType in
Text(viewType.title)
}
}
.pickerStyle(.segmented)
.padding([.top, .leading, .trailing])
if bridgeModule.isInWorkout {
Button(action: {
showCurrentWorkout()
}, label: {
Image(systemName: "figure.strengthtraining.traditional")
.padding(.trailing)
})
.tint(Color("appColor"))
}
}
}
}