2020-08-10 20:21:26 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct SettingsHeaderView: View {
|
2020-09-11 17:53:11 +00:00
|
|
|
@Environment(\.presentationMode) var presentationMode
|
2020-08-10 20:21:26 +00:00
|
|
|
|
|
|
|
var body: some View {
|
2020-09-16 16:46:28 +00:00
|
|
|
VStack {
|
|
|
|
HStack {
|
|
|
|
Text("Settings")
|
|
|
|
.font(.largeTitle)
|
|
|
|
.fontWeight(.bold)
|
|
|
|
Spacer()
|
|
|
|
Button(action: {
|
|
|
|
presentationMode.wrappedValue.dismiss()
|
|
|
|
}, label: {
|
|
|
|
Image(systemName: "xmark.circle")
|
|
|
|
})
|
2020-12-29 21:52:26 +00:00
|
|
|
.accessibilityLabel(Text("Close"))
|
|
|
|
.accessibilityHint(Text("Dismiss the Settings sheet"))
|
2020-09-16 16:46:28 +00:00
|
|
|
}
|
|
|
|
Text("WriteFreely v\(Bundle.main.appMarketingVersion) (build \(Bundle.main.appBuildVersion))")
|
|
|
|
.font(.caption)
|
|
|
|
.foregroundColor(.secondary)
|
|
|
|
.padding(.top)
|
2020-08-10 20:21:26 +00:00
|
|
|
}
|
|
|
|
.padding()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct SettingsHeaderView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
2020-09-11 17:53:11 +00:00
|
|
|
SettingsHeaderView()
|
2020-08-10 20:21:26 +00:00
|
|
|
}
|
|
|
|
}
|