DayByDay/Profiles/AvatarBadge.swift
25 lines · 587 bytes
1 symbol in this file
1//
2// AvatarBadge.swift
3// DayByDay
4//
5
6import SwiftUI
7
8/// A child's avatar animal on their color.
9struct AvatarBadge: View {
10 let avatar: AvatarAnimal
11 let color: ProfileColor
12
13 var body: some View {
14 GeometryReader { geo in
15 ZStack {
16 Circle().fill(color.color)
17 Image(systemName: avatar.symbol)
18 .font(.system(size: geo.size.width * 0.5))
19 .foregroundStyle(color.symbolColor)
20 }
21 }
22 .aspectRatio(1, contentMode: .fit)
23 .accessibilityHidden(true)
24 }
25}