CGMRootView.swift 564 B

12345678910111213141516171819202122
  1. import SwiftUI
  2. extension CGM {
  3. struct RootView: BaseView {
  4. @EnvironmentObject var viewModel: ViewModel<Provider>
  5. var body: some View {
  6. Form {
  7. Section {
  8. Picker("Type", selection: $viewModel.cgm) {
  9. ForEach(CGMType.allCases) {
  10. Text($0.displayName).tag($0)
  11. }
  12. }
  13. }
  14. }
  15. .navigationTitle("CGM")
  16. .navigationBarTitleDisplayMode(.automatic)
  17. }
  18. }
  19. }