PumpVolumeAlarmEditor.swift 919 B

1234567891011121314151617181920212223242526272829303132333435
  1. // LoopFollow
  2. // PumpVolumeAlarmEditor.swift
  3. import SwiftUI
  4. struct PumpVolumeAlarmEditor: View {
  5. @Binding var alarm: Alarm
  6. var body: some View {
  7. Group {
  8. InfoBanner(
  9. text: "This warns you when the insulin pump is running low on insulin.",
  10. alarmType: alarm.type
  11. )
  12. AlarmGeneralSection(alarm: $alarm)
  13. AlarmStepperSection(
  14. header: "Trigger Level",
  15. footer: "An alert fires once the reservoir is at this value "
  16. + "or lower.",
  17. title: "Reservoir Below",
  18. range: 1 ... 50,
  19. step: 1,
  20. unitLabel: "Units",
  21. value: $alarm.threshold
  22. )
  23. AlarmActiveSection(alarm: $alarm)
  24. AlarmAudioSection(alarm: $alarm)
  25. AlarmSnoozeSection(alarm: $alarm)
  26. }
  27. }
  28. }