17 lines
398 B
Swift
17 lines
398 B
Swift
import SwiftUI
|
|
|
|
// Note: This does not work as an actual form style, as it adds toolbars, etc. multiple times, so just using as a modifier.
|
|
extension View {
|
|
|
|
public func applyFormStyle() -> some View {
|
|
self
|
|
.labelsHidden()
|
|
// .formStyle(.grouped)
|
|
.textLabelStyle(.boldSecondary)
|
|
.textFieldStyle(.roundedBorder)
|
|
#if os(macOS)
|
|
.padding()
|
|
#endif
|
|
}
|
|
}
|