krz/daybyday

iOS learning games for young children: days, months, seasons, numbers, letters, animals and more. education ios kids swift https://krz.sh/apps/daybyday/

DayByDay/Quiz/ClothingTile.swift

062549ad26607ce9e973ed2a9a7ef6f853885f83
daybyday/DayByDay/Quiz/ClothingTile.swift history · blame · raw

27 lines · 784 bytes

1 symbol in this file
 1//
 2//  ClothingTile.swift
 3//  DayByDay
 4//
 5
 6import SwiftUI
 7
 8/// A thing to wear, white on the weather topic color.
 9struct ClothingTile: View {
10    let item: QuizItem
11
12    var body: some View {
13        let clothing = Clothing.from(item)
14        VStack(spacing: 10) {
15            Image(systemName: clothing?.symbol ?? "questionmark")
16                .font(.system(size: 56))
17                .frame(height: 64)
18            Text(item.name)
19                .font(.heading(22))
20        }
21        .foregroundStyle(.white)
22        .frame(maxWidth: .infinity, maxHeight: .infinity)
23        .padding(12)
24        .background(RoundedRectangle(cornerRadius: 32, style: .continuous).fill(Category.weather.color))
25        .contentShape(RoundedRectangle(cornerRadius: 32, style: .continuous))
26    }
27}