GBA002/DeltaFeatures/Views/OptionToggleView.swift
Riley Testut ef47d78c64 [Features] Adds displayInline(_:) View modifier
Controls whether @Option detailView will be displayed inline in the Feature detail view in Delta’s settings, or as a full-screen view that’s pushed onto navigation stack when tapped.
2023-04-14 18:23:34 -05:00

24 lines
448 B
Swift

//
// OptionToggleView.swift
// DeltaFeatures
//
// Created by Riley Testut on 4/11/23.
// Copyright © 2023 Riley Testut. All rights reserved.
//
import SwiftUI
// Type must be public, but not its properties.
public struct OptionToggleView: View
{
var name: LocalizedStringKey
@Binding
var selectedValue: Bool
public var body: some View {
Toggle(name, isOn: $selectedValue)
.displayInline()
}
}