COBAlarmEditor.swift 878 B

1234567891011121314151617181920212223242526272829303132333435
  1. // LoopFollow
  2. // COBAlarmEditor.swift
  3. import SwiftUI
  4. struct COBAlarmEditor: View {
  5. @Binding var alarm: Alarm
  6. var body: some View {
  7. Group {
  8. InfoBanner(
  9. text: "Alerts when Carbs-on-Board is at or above the amount you set below.",
  10. alarmType: alarm.type
  11. )
  12. AlarmGeneralSection(alarm: $alarm)
  13. AlarmStepperSection(
  14. header: "Carbs-on-Board Limit",
  15. footer: "Alert when Carbs-on-Board is at or above this number.",
  16. title: "At or Above",
  17. range: 1 ... 200,
  18. step: 1,
  19. unitLabel: "g",
  20. value: $alarm.threshold
  21. )
  22. AlarmActiveSection(alarm: $alarm)
  23. AlarmAudioSection(alarm: $alarm)
  24. AlarmSnoozeSection(alarm: $alarm)
  25. }
  26. }
  27. }