27 lines
548 B
Swift
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)
|
|
}
|
|
}
|
|
}
|