Run SwiftFormat and fix SwiftLint.

This commit is contained in:
Doug
2025-09-28 15:25:05 +01:00
committed by Doug
parent ed73853c9b
commit 90eeabf9de
15 changed files with 54 additions and 46 deletions
@@ -184,14 +184,14 @@ public extension ListRow where DetailsIcon == EmptyView, CustomContent == EmptyV
// Custom row without a label or details label.
public extension ListRow where Icon == EmptyView, DetailsIcon == EmptyView {
init(kind: Kind<CustomContent, SelectionValue>) {
self.label = ListRowLabel()
self.details = nil
label = ListRowLabel()
details = nil
self.kind = kind
}
init(kind: Kind<CustomContent, SelectionValue>) where SelectionValue == String {
self.label = ListRowLabel()
self.details = nil
label = ListRowLabel()
details = nil
self.kind = kind
}
}
@@ -249,6 +249,7 @@ private extension Button {
// MARK: - Previews
// swiftlint:disable print_deprecation
public struct ListRow_Previews: PreviewProvider, TestablePreview {
public static var previews: some View {
Form {
@@ -348,14 +349,14 @@ public struct ListRow_Previews: PreviewProvider, TestablePreview {
systemIcon: .squareDashed),
details: .title("Content"),
kind: .selection(isSelected: true) {
print("I was tapped!")
})
print("I was tapped!")
})
ListRow(label: .default(title: "Title",
systemIcon: .squareDashed),
details: .title("Content"),
kind: .selection(isSelected: true) {
print("I was tapped!")
})
print("I was tapped!")
})
ListRow(label: .plain(title: "Title"),
kind: .inlinePicker(selection: .constant("Item 1"),
@@ -375,7 +376,7 @@ public struct ListRow_Previews: PreviewProvider, TestablePreview {
ListRow(label: .action(title: "Title",
systemIcon: .squareDashed),
kind: .button { print("I was tapped!") })
.disabled(true)
.disabled(true)
}
static var plainButton: some View {
@@ -401,7 +402,7 @@ public struct ListRow_Previews: PreviewProvider, TestablePreview {
ListRow(label: .centeredAction(title: "Title",
systemIcon: .squareDashed),
kind: .button { print("I was tapped!") })
.disabled(true)
.disabled(true)
}
}
@@ -445,10 +446,10 @@ public struct ListRow_Previews: PreviewProvider, TestablePreview {
})
ListRow(label: .plain(title: "Placeholder"),
kind: .textField(text: .constant("This is a disabled text field")))
.disabled(true)
.disabled(true)
ListRow(label: .plain(title: "Placeholder"),
kind: .textField(text: .constant(""), axis: .vertical))
.lineLimit(4...)
.lineLimit(4...)
ListRow(label: .plain(title: "Password"),
kind: .secureField(text: .constant("p4ssw0rd")))
}
@@ -474,3 +475,5 @@ struct ListRowLoadingSelection_Previews: PreviewProvider, TestablePreview {
.compoundList()
}
}
// swiftlint:enable print_deprecation