summaryrefslogtreecommitdiff
path: root/ShapesView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'ShapesView.swift')
-rw-r--r--ShapesView.swift30
1 files changed, 30 insertions, 0 deletions
diff --git a/ShapesView.swift b/ShapesView.swift
new file mode 100644
index 0000000..347dbad
--- /dev/null
+++ b/ShapesView.swift
@@ -0,0 +1,30 @@
+//
+// ShapesView.swift
+// DayByDay
+//
+
+import SwiftUI
+
+/// Displays 8 shapes as large, tappable cards in a scrollable grid.
+/// Adapts between 1 and 2 columns depending on available width.
+struct ShapesView: View {
+ private let columns = [
+ GridItem(.adaptive(minimum: 300, maximum: 500), spacing: 24)
+ ]
+
+ var body: some View {
+ ScrollView {
+ LazyVGrid(columns: columns, spacing: 24) {
+ ForEach(LearnShape.allCases) { shape in
+ ShapeCard(shape: shape)
+ .frame(height: 200)
+ }
+ }
+ .padding(32)
+ }
+ }
+}
+
+#Preview {
+ ShapesView()
+}