mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
35 lines
1020 B
Swift
35 lines
1020 B
Swift
import SwiftUI
|
|
|
|
struct SettingsHeaderView: View {
|
|
@Environment(\.presentationMode) var presentationMode
|
|
|
|
var body: some View {
|
|
VStack {
|
|
HStack {
|
|
Text("Settings")
|
|
.font(.largeTitle)
|
|
.fontWeight(.bold)
|
|
Spacer()
|
|
Button(action: {
|
|
presentationMode.wrappedValue.dismiss()
|
|
}, label: {
|
|
Image(systemName: "xmark.circle")
|
|
})
|
|
.accessibilityLabel(Text("Close"))
|
|
.accessibilityHint(Text("Dismiss the Settings sheet"))
|
|
}
|
|
Text("WriteFreely v\(Bundle.main.appMarketingVersion) (build \(Bundle.main.appBuildVersion))")
|
|
.font(.caption)
|
|
.foregroundColor(.secondary)
|
|
.padding(.top)
|
|
}
|
|
.padding()
|
|
}
|
|
}
|
|
|
|
struct SettingsHeaderView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
SettingsHeaderView()
|
|
}
|
|
}
|