mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
30 lines
811 B
Swift
30 lines
811 B
Swift
import SwiftUI
|
|
|
|
struct TrendingCategorySelectionView: View {
|
|
@Environment(\.presentationMode) private var presentationMode
|
|
|
|
@Binding var selectedCategory: TrendingCategory
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
VisualEffectView(effect: UIBlurEffect(style: .dark))
|
|
|
|
VStack(alignment: .leading) {
|
|
Spacer()
|
|
|
|
ForEach(TrendingCategory.allCases) { category in
|
|
Button(category.name) {
|
|
selectedCategory = category
|
|
presentationMode.wrappedValue.dismiss()
|
|
}
|
|
}
|
|
.frame(width: 800)
|
|
|
|
Spacer()
|
|
}
|
|
}
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
.edgesIgnoringSafeArea(.all)
|
|
}
|
|
}
|