krz/daybyday
clone: git clone https://gitbay.org/krz/daybyday.git
main: AlphabetView.swift · raw
1//
2// AlphabetView.swift
3// DayByDay
4//
5
6import SwiftUI
7
8/// Displays all 26 letters A–Z as large, tappable cards in a scrollable grid.
9/// Uses a smaller minimum size to fit more letters across the screen.
10struct AlphabetView: View {
11 private let columns = [
12 GridItem(.adaptive(minimum: 140, maximum: 300), spacing: 20)
13 ]
14
15 var body: some View {
16 ScrollView {
17 LazyVGrid(columns: columns, spacing: 20) {
18 ForEach(LearnLetter.allCases) { letter in
19 LetterCard(letter: letter)
20 .frame(height: 160)
21 }
22 }
23 .padding(32)
24 }
25 }
26}
27
28#Preview {
29 AlphabetView()
30}