ChWebsiteApp/CHDataManagement/Views/Generic/BoolPropertyView.swift
2024-12-16 09:54:21 +01:00

27 lines
548 B
Swift

import SwiftUI
struct BoolPropertyView: View {
let title: LocalizedStringKey
@Binding
var value: Bool
let footer: LocalizedStringKey
var body: some View {
VStack(alignment: .leading) {
HStack {
Text(title)
.font(.headline)
Spacer()
Toggle("", isOn: $value)
.toggleStyle(.switch)
}
Text(footer)
.foregroundStyle(.secondary)
.padding(.bottom)
}
}
}