mirror of
https://github.com/yattee/yattee.git
synced 2024-12-15 14:50:32 +05:30
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)
|
|
}
|
|
}
|