summaryrefslogtreecommitdiff
path: root/FoodView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'FoodView.swift')
-rw-r--r--FoodView.swift29
1 files changed, 29 insertions, 0 deletions
diff --git a/FoodView.swift b/FoodView.swift
new file mode 100644
index 0000000..4ee09d2
--- /dev/null
+++ b/FoodView.swift
@@ -0,0 +1,29 @@
+//
+// FoodView.swift
+// DayByDay
+//
+
+import SwiftUI
+
+/// Displays all 12 fruits and vegetables as large, tappable cards in a scrollable grid.
+struct FoodView: View {
+ private let columns = [
+ GridItem(.adaptive(minimum: 280), spacing: 24)
+ ]
+
+ var body: some View {
+ ScrollView {
+ LazyVGrid(columns: columns, spacing: 24) {
+ ForEach(LearnFood.allCases) { food in
+ FoodCard(food: food)
+ .frame(height: 200)
+ }
+ }
+ .padding(32)
+ }
+ }
+}
+
+#Preview {
+ FoodView()
+}