21 lines
480 B
Swift
21 lines
480 B
Swift
import SwiftUI
|
|
|
|
struct ToggleHeaderView: View {
|
|
let title: String
|
|
let description: String
|
|
@Binding var isEnabled: Bool
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading, spacing: 8) {
|
|
Toggle(title, isOn: $isEnabled)
|
|
.font(.headline)
|
|
|
|
Text(description)
|
|
.font(.subheadline)
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
.padding()
|
|
.background(Color(.systemBackground))
|
|
}
|
|
}
|