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