PumpVolumeAlarmEditor.swift 970 B

12345678910111213141516171819202122232425262728293031323334
  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: String(localized: "Trigger Level"),
  15. footer: String(localized: "An alert fires once the reservoir is at this value or lower."),
  16. title: String(localized: "Reservoir Below"),
  17. range: 1 ... 50,
  18. step: 1,
  19. unitLabel: String(localized: "Units"),
  20. value: $alarm.threshold
  21. )
  22. AlarmActiveSection(alarm: $alarm)
  23. AlarmAudioSection(alarm: $alarm)
  24. AlarmSnoozeSection(alarm: $alarm)
  25. }
  26. }
  27. }