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
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -17,22 +17,21 @@
|
||||
import SwiftUI
|
||||
|
||||
struct RoundedBorderTextField: View {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
var title: String? = nil
|
||||
var title: String?
|
||||
let placeHolder: String
|
||||
@Binding var text: String
|
||||
var footerText: String? = nil
|
||||
var isError: Bool = false
|
||||
var footerText: String?
|
||||
var isError = false
|
||||
var isFirstResponder = false
|
||||
|
||||
var configuration: UIKitTextInputConfiguration = UIKitTextInputConfiguration()
|
||||
var configuration = UIKitTextInputConfiguration()
|
||||
@State var isSecureTextVisible = false
|
||||
|
||||
var onTextChanged: ((String) -> Void)? = nil
|
||||
var onEditingChanged: ((Bool) -> Void)? = nil
|
||||
var onCommit: (() -> Void)? = nil
|
||||
var onTextChanged: ((String) -> Void)?
|
||||
var onEditingChanged: ((Bool) -> Void)?
|
||||
var onCommit: (() -> Void)?
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -101,7 +100,7 @@ struct RoundedBorderTextField: View {
|
||||
private var borderColor: Color {
|
||||
if isEditing {
|
||||
return theme.colors.accent
|
||||
} else if footerText != nil && isError {
|
||||
} else if footerText != nil, isError {
|
||||
return theme.colors.alert
|
||||
} else {
|
||||
return theme.colors.quinaryContent
|
||||
@@ -118,7 +117,6 @@ struct RoundedBorderTextField: View {
|
||||
|
||||
struct TextFieldWithError_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
|
||||
Group {
|
||||
sampleView.theme(.light).preferredColorScheme(.light)
|
||||
sampleView.theme(.dark).preferredColorScheme(.dark)
|
||||
|
||||
Reference in New Issue
Block a user