macOS: split AppMain into focused modules
This commit is contained in:
1 parent
c5c50a2141
commit
82e751a153
22 files changed
+3618
-3683
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SettingsToggleRow: View {
|
||||
let title: String
|
||||
let subtitle: String?
|
||||
@Binding var binding: Bool
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Toggle(isOn: self.$binding) {
|
||||
Text(self.title)
|
||||
.font(.body)
|
||||
}
|
||||
.toggleStyle(.checkbox)
|
||||
|
||||
if let subtitle, !subtitle.isEmpty {
|
||||
Text(subtitle)
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.tertiary)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user