Fix wrong colors in PDF export
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TitledTextSection: View {
|
||||
|
||||
@Environment(\.colorScheme)
|
||||
var colorScheme: ColorScheme
|
||||
|
||||
let content: Titled<String>
|
||||
|
||||
@ -8,6 +11,10 @@ struct TitledTextSection: View {
|
||||
|
||||
let paragraphSpacing: CGFloat
|
||||
|
||||
private var textColor: Color {
|
||||
colorScheme == .light ? .lightSchemePrimaryColor : .darkSchemePrimaryColor
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
TitledSection(title: content.title, spacing: titleSpacing) {
|
||||
ForEach(content.items) { text in
|
||||
@ -15,6 +22,7 @@ struct TitledTextSection: View {
|
||||
.font(.body)
|
||||
.fontWeight(.light)
|
||||
.padding(.bottom, paragraphSpacing)
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user