TeraCalendarMetadata.swift (619B)
1 import SwiftUI 2 3 struct TeraCalendarMetadata: View { 4 let card: TeraTodayCard 5 let presentation: TeraTodayCardPresentation 6 @Environment(\.locale) private var locale 7 @Environment(\.timeZone) private var timeZone 8 9 var body: some View { 10 VStack(alignment: .leading, spacing: 4) { 11 if let timing = card.calendarTiming { 12 Label(TeraCalendarPresentation(locale: locale, timeZone: timeZone).summary(timing), systemImage: "calendar") 13 } 14 if let location = card.location { 15 Label(presentation.label(location), systemImage: "mappin.and.ellipse") 16 } 17 } 18 .font(.subheadline) 19 } 20 }