WIP
This commit is contained in:
@@ -14,21 +14,16 @@ struct CreateWorkoutMainView: View {
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Divider()
|
||||
|
||||
TextField("Title", text: $viewModel.title)
|
||||
.padding()
|
||||
.frame(height: 55)
|
||||
.textFieldStyle(PlainTextFieldStyle())
|
||||
.padding([.horizontal], 4)
|
||||
.overlay(RoundedRectangle(cornerRadius: 16).stroke(Color(uiColor: .clear))).background(Color(uiColor: .init(red: 200/255, green: 200/255, blue: 200/255, alpha: 0.2)))
|
||||
// .cornerRadius(8)
|
||||
.textFieldStyle(OvalTextFieldStyle())
|
||||
|
||||
TextField("Description", text: $viewModel.description)
|
||||
.padding()
|
||||
.frame(height: 55)
|
||||
.textFieldStyle(PlainTextFieldStyle())
|
||||
.padding([.horizontal], 4)
|
||||
.overlay(RoundedRectangle(cornerRadius: 16).stroke(Color(uiColor: .clear))).background(Color(uiColor: .init(red: 200/255, green: 200/255, blue: 200/255, alpha: 0.2)))
|
||||
// .cornerRadius(8)
|
||||
.textFieldStyle(OvalTextFieldStyle())
|
||||
|
||||
List() {
|
||||
ForEach($viewModel.superSets, id: \.id) { superset in
|
||||
@@ -72,6 +67,16 @@ struct CreateWorkoutMainView: View {
|
||||
}
|
||||
.listRowSeparator(.hidden)
|
||||
}
|
||||
.background(Color(uiColor: .secondarySystemBackground))
|
||||
.overlay(Group {
|
||||
if($viewModel.superSets.isEmpty) {
|
||||
ZStack() {
|
||||
Color(uiColor: .secondarySystemBackground)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Divider()
|
||||
|
||||
HStack {
|
||||
Button("Add Superset", action: {
|
||||
@@ -101,7 +106,9 @@ struct CreateWorkoutMainView: View {
|
||||
}
|
||||
.frame(height: 44)
|
||||
.padding(.bottom)
|
||||
.background(Color(uiColor: .systemGroupedBackground))
|
||||
}
|
||||
.background(Color(uiColor: .systemGroupedBackground))
|
||||
.sheet(isPresented: $showAddExercise) {
|
||||
AddExerciseView(selectedExercise: { exercise in
|
||||
let workoutExercise = CreateWorkoutExercise(exercise: exercise)
|
||||
|
||||
Reference in New Issue
Block a user