parent
797caf55a2
commit
af97c40270
@ -1,39 +0,0 @@ |
||||
// |
||||
// AgendaDestinationPickerView.swift |
||||
// PadelClub |
||||
// |
||||
// Created by Razmig Sarkissian on 01/03/2024. |
||||
// |
||||
|
||||
import SwiftUI |
||||
|
||||
struct AgendaDestinationPickerView: View { |
||||
@Binding var agendaDestination: AgendaDestination |
||||
|
||||
var body: some View { |
||||
HStack { |
||||
ForEach(AgendaDestination.allCases) { screen in |
||||
|
||||
Button { |
||||
agendaDestination = screen |
||||
} label: { |
||||
Label(screen.localizedTitleKey, systemImage: screen.systemImage) |
||||
} |
||||
.padding() |
||||
.background { |
||||
Capsule(style: .continuous) |
||||
.fill(.white) |
||||
.opacity(screen == agendaDestination ? 1.0 : 0.5) |
||||
} |
||||
.labelStyle(.titleOnly) |
||||
.buttonStyle(.plain) |
||||
} |
||||
} |
||||
.listRowInsets(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0)) |
||||
.listRowBackground(Color.clear) |
||||
} |
||||
} |
||||
|
||||
#Preview { |
||||
AgendaDestinationPickerView(agendaDestination: .constant(.activity)) |
||||
} |
||||
Loading…
Reference in new issue