2024-04-05 15:40:30 -05:00

40 lines
722 B
Swift

import SwiftUI
// MARK: - SectionHeaderView
/// A section header.
///
struct SectionHeaderView: View {
// MARK: Properties
/// The section title.
let title: String
// MARK: View
var body: some View {
Text(title)
.styleGuide(.footnote)
.accessibilityAddTraits(.isHeader)
.foregroundColor(Color(asset: Asset.Colors.textSecondary))
.textCase(.uppercase)
}
// MARK: Initialization
/// Initializes a new section header.
///
/// - Parameters:
/// - title: The section title.
///
init(_ title: String) {
self.title = title
}
}
// MARK: Previews
#Preview {
SectionHeaderView("Section header")
}