mirror of
https://github.com/bitwarden/ios.git
synced 2025-12-12 07:43:01 -06:00
40 lines
722 B
Swift
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")
|
|
}
|