PumpChangeAlarmEditor.swift 992 B

123456789101112131415161718192021222324252627282930313233343536
  1. // LoopFollow
  2. // PumpChangeAlarmEditor.swift
  3. import SwiftUI
  4. struct PumpChangeAlarmEditor: View {
  5. @Binding var alarm: Alarm
  6. var body: some View {
  7. Group {
  8. InfoBanner(
  9. text: "Alerts when the pump / cannula is within the time "
  10. + "window you choose below (relative to the 3-day change "
  11. + "limit).",
  12. alarmType: alarm.type
  13. )
  14. AlarmGeneralSection(alarm: $alarm)
  15. AlarmStepperSection(
  16. header: "Advance Notice",
  17. footer: "How many hours before the 3-day limit you’d like a reminder.",
  18. title: "Warning Time",
  19. range: 1 ... 24,
  20. step: 1,
  21. unitLabel: "Hours",
  22. value: $alarm.threshold
  23. )
  24. AlarmActiveSection(alarm: $alarm)
  25. AlarmAudioSection(alarm: $alarm)
  26. AlarmSnoozeSection(alarm: $alarm)
  27. }
  28. }
  29. }