//
//  ScreenTimeoutEditorView.swift
//  USB Meter
//

import SwiftUI

struct ScreenTimeoutEditorView: View {
    @EnvironmentObject private var meter: Meter

    var body: some View {
        Picker("", selection: self.$meter.screenTimeout) {
            ForEach(1...9, id: \.self) { value in
                Text("\(value)").tag(value)
            }
            Text("Off").tag(0)
        }
        .pickerStyle(SegmentedPickerStyle())
    }
}