SettingsRootView.swift 649 B

1234567891011121314151617181920212223
  1. import SwiftUI
  2. extension Settings {
  3. struct RootView: BaseView {
  4. @EnvironmentObject var viewModel: ViewModel<Provider>
  5. var body: some View {
  6. VStack {
  7. Text("Settings screen")
  8. Button(action: viewModel.openProfileEditor) {
  9. Text("Open Editor")
  10. .frame(maxWidth: .infinity)
  11. .foregroundColor(.white)
  12. .buttonBackground()
  13. }
  14. Spacer()
  15. }
  16. .padding()
  17. .toolbar { ToolbarItem(placement: .principal) { Text("Settings") } }
  18. }
  19. }
  20. }