import SwiftUI import SFSafeSymbols struct CareerStationView: View { let info: CareerStation let borderSpacing: CGFloat let borderWidth: CGFloat var body: some View { LeftBorderView(color: .accentColor, spacing: borderSpacing, borderWidth: borderWidth) { VStack(alignment: .leading) { HStack { RightImageLabel(info.time, systemSymbol: .calendar) .padding(.leading, -4) Spacer() RightImageLabel(info.location, systemSymbol: .pin) } .font(.caption) .foregroundColor(.secondary) Text(info.title) .font(.headline) .fontWeight(.regular) if let subtitle = info.subtitle { Text(subtitle) .font(.subheadline) .foregroundColor(.accentColor) } if let text = info.text { Text(text) .font(.caption) .foregroundColor(.secondary) } } } } } struct CareerStationView_Previews: PreviewProvider { static var previews: some View { CareerStationView(info: .init( time: "Jul 2020 - Jul 2023", location: "Braunschweig, Germany", title: "German Aerospace Center", subtitle: "Systems engineer", text: "Responsible for aircraft systems and avionics of a high-altitude solar drone, safety, and software."), borderSpacing: 5, borderWidth: 3) .previewLayout(.fixed(width: 300, height: 100)) } }