Impressia/Vernissage/Views/ComposeView.swift

47 lines
1.2 KiB
Swift
Raw Normal View History

2023-01-06 18:16:08 +01:00
//
// https://mczachurski.dev
// Copyright © 2023 Marcin Czachurski and the repository contributors.
// Licensed under the MIT License.
//
import SwiftUI
struct ComposeView: View {
@Environment(\.dismiss) private var dismiss
var body: some View {
NavigationView {
VStack{
Text("Composen message placeholder")
.font(.caption2)
.foregroundColor(.mainTextColor)
}
.toolbar {
ToolbarItem(placement: .primaryAction) {
Button {
dismiss()
} label: {
Text("Publish")
.foregroundColor(.white)
}
.buttonStyle(.borderedProminent)
.tint(.accentColor)
}
ToolbarItem(placement: .cancellationAction) {
Button("Cancel", role: .cancel) {
dismiss()
}
}
}
.navigationBarTitle(Text("Compose"), displayMode: .inline)
}
}
}
struct ComposeView_Previews: PreviewProvider {
static var previews: some View {
ComposeView()
}
}