feat: Adds form style to styleguide.
This commit is contained in:
15
Sources/Styleguide/Styles/FormStyle.swift
Normal file
15
Sources/Styleguide/Styles/FormStyle.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
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()
|
||||
.textLabelStyle(.boldSecondary)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
#if os(macOS)
|
||||
.padding()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user