You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
PadelClub/PadelClub/Views/Shared/MatchFormatSelectionView.swift

33 lines
867 B

//
// MatchFormatSelectionView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 22/03/2024.
//
import SwiftUI
struct MatchFormatSelectionView: View {
@Environment(\.dismiss) private var dismiss
@Binding var matchFormat: MatchFormat
var additionalEstimationDuration: Int?
var body: some View {
List {
Section {
Picker(selection: $matchFormat) {
ForEach(MatchFormat.allCases) { format in
MatchFormatRowView(matchFormat: format, additionalEstimationDuration: additionalEstimationDuration).tag(format)
}
} label: {
}
.labelsHidden()
.pickerStyle(.inline)
}
}
.onChange(of: matchFormat) {
dismiss()
}
}
}