mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Configured and applied SwiftFormat
This commit is contained in:
committed by
Stefan Ceriu
parent
ff2e6ddfa7
commit
43c28d23b7
@@ -19,7 +19,6 @@ import SwiftUI
|
||||
|
||||
/// An input field style for forms.
|
||||
struct FormInputFieldStyle: TextFieldStyle {
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
@Environment(\.isEnabled) var isEnabled
|
||||
|
||||
@@ -31,7 +30,7 @@ struct FormInputFieldStyle: TextFieldStyle {
|
||||
}
|
||||
|
||||
private var backgroundColor: Color {
|
||||
if !isEnabled && theme.identifier == .dark {
|
||||
if !isEnabled, theme.identifier == .dark {
|
||||
return theme.colors.quinaryContent
|
||||
}
|
||||
return theme.colors.background
|
||||
@@ -47,7 +46,6 @@ struct FormInputFieldStyle: TextFieldStyle {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct FormInputFieldStyle_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
@@ -59,7 +57,6 @@ struct FormInputFieldStyle_Previews: PreviewProvider {
|
||||
TextField("Placeholder", text: .constant("Web"))
|
||||
.textFieldStyle(FormInputFieldStyle())
|
||||
.disabled(true)
|
||||
|
||||
}
|
||||
.padding()
|
||||
VectorForm {
|
||||
@@ -70,11 +67,9 @@ struct FormInputFieldStyle_Previews: PreviewProvider {
|
||||
TextField("Placeholder", text: .constant("Web"))
|
||||
.textFieldStyle(FormInputFieldStyle())
|
||||
.disabled(true)
|
||||
|
||||
}
|
||||
.padding()
|
||||
.theme(ThemeIdentifier.dark)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user