| 1 | import SwiftUI |
| 2 | |
| 3 | struct SectionHeader: View { |
| 4 | let title: String |
| 5 | let subtitle: String? |
| 6 | |
| 7 | init(_ title: String, subtitle: String? = nil) { |
| 8 | self.title = title |
| 9 | self.subtitle = subtitle |
| 10 | } |
| 11 | |
| 12 | var body: some View { |
| 13 | VStack(alignment: .leading, spacing: 4) { |
| 14 | Text(title) |
| 15 | .font(KleponTypography.sectionTitle) |
| 16 | .foregroundStyle(KleponColor.textPrimary) |
| 17 | |
| 18 | if let subtitle { |
| 19 | Text(subtitle) |
| 20 | .font(KleponTypography.bodySecondary) |
| 21 | .foregroundStyle(KleponColor.textSecondary) |
| 22 | } |
| 23 | } |
| 24 | .frame(maxWidth: .infinity, alignment: .leading) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | struct TVPageHeader: View { |
| 29 | let title: String |
| 30 | |
| 31 | init(_ title: String) { |
| 32 | self.title = title |
| 33 | } |
| 34 | |
| 35 | var body: some View { |
| 36 | Text(title) |
| 37 | .font(KleponTypography.screenTitle) |
| 38 | .foregroundStyle(KleponColor.textPrimary) |
| 39 | .frame(maxWidth: .infinity, alignment: .center) |
| 40 | .padding(.top, 4) |
| 41 | .padding(.bottom, 8) |
| 42 | } |
| 43 | } |