diff options
Diffstat (limited to 'BodyPartsView.swift')
| -rw-r--r-- | BodyPartsView.swift | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/BodyPartsView.swift b/BodyPartsView.swift new file mode 100644 index 0000000..73019f5 --- /dev/null +++ b/BodyPartsView.swift @@ -0,0 +1,29 @@ +// +// BodyPartsView.swift +// DayByDay +// + +import SwiftUI + +/// Displays all 12 body parts as large, tappable cards in a scrollable grid. +struct BodyPartsView: View { + private let columns = [ + GridItem(.adaptive(minimum: 280), spacing: 24) + ] + + var body: some View { + ScrollView { + LazyVGrid(columns: columns, spacing: 24) { + ForEach(LearnBodyPart.allCases) { part in + BodyPartCard(bodyPart: part) + .frame(height: 200) + } + } + .padding(32) + } + } +} + +#Preview { + BodyPartsView() +} |
