CHResume/ResumeBuilder/Main Elements/TitledCareerSection.swift

50 lines
1.7 KiB
Swift
Raw Normal View History

2023-08-18 22:47:24 +02:00
import SwiftUI
struct TitledCareerSection: View {
let style: CVStyle.Section
2023-08-23 16:17:34 +02:00
let accent: Color
2023-08-18 22:47:24 +02:00
let content: Titled<CareerStation>
var body: some View {
TitledSection(title: content.title, spacing: style.titleSpacing) {
ForEach(content.items) { item in
CareerStationView(
info: item,
borderSpacing: style.borderSpacing,
2023-08-23 16:17:34 +02:00
borderWidth: style.borderWidth,
accent: accent)
2023-08-18 22:47:24 +02:00
.padding(.bottom, style.bottomSpacing)
}
}
}
}
struct TitledItemSection_Previews: PreviewProvider {
static var previews: some View {
TitledCareerSection(
style: .init(),
2023-08-23 16:17:34 +02:00
accent: .orange,
2023-08-18 22:47:24 +02:00
content: .init(
title: "Work experience",
items: [
.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."),
.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.")
])
)
.previewLayout(.fixed(width: 350, height: 400))
}
}