import SwiftUI struct PageSettingsView: View { @Environment(\.language) private var language @EnvironmentObject private var content: Content var body: some View { ScrollView { VStack(alignment: .leading) { Text("Page Settings") .font(.largeTitle) .bold() Text("Change the way pages are displayed") .padding(.bottom, 30) Text("Content Width") .font(.headline) IntegerField("", number: $content.settings.pages.contentWidth) .textFieldStyle(.roundedBorder) .frame(maxWidth: 400) Text("The maximum width of the content in pages (in pixels)") .foregroundStyle(.secondary) .padding(.bottom) Text("Page URL Prefix") .font(.headline) TextField("", text: $content.settings.pages.pageUrlPrefix) .textFieldStyle(.roundedBorder) .frame(maxWidth: 400) Text("The URL prefix used for the links to pages") .foregroundStyle(.secondary) .padding(.bottom) } } } } #Preview { PageSettingsView() .environmentObject(Content.mock) .padding() }