Skip to content

Commit b06bf56

Browse files
authored
Merge pull request #3 from jcook03266/Dev
Merge Dev to Master
2 parents a06d38c + cc00f72 commit b06bf56

File tree

1 file changed

+17
-34
lines changed

1 file changed

+17
-34
lines changed

Sources/Sheathed-TextField-SwiftUI/Public/Views/SheathedTextField.swift

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -134,46 +134,29 @@ public struct SheathedTextField: View {
134134
if !model.protected {
135135
TextField(placeholderText,
136136
text: model.boundTextEntry)
137-
.foregroundColor(model.textFieldTextColor)
138-
.textInputAutocapitalization(model.textInputAutocapitalization)
139-
.textContentType(model.textContentType)
140-
.keyboardType(model.keyboardType)
141-
.disabled(!model.unsheathed)
142-
.autocorrectionDisabled(model.autoCorrectionDisabled)
143-
.focused($textFieldFocused)
144-
.frame(width: textFieldSize.width,
145-
height: textFieldSize.height)
146-
.padding([.leading],
147-
textFieldLeadingPadding)
148-
.padding([.trailing],
149-
textFieldTrailingPadding)
150-
.submitLabel(model.submitLabel)
151-
.onSubmit {
152-
model.onSubmitAction?()
153-
}
154137
}
155138
else {
156139
SecureField(placeholderText,
157140
text: model.boundTextEntry)
158-
.foregroundColor(model.textFieldTextColor)
159-
.textInputAutocapitalization(model.textInputAutocapitalization)
160-
.textContentType(model.textContentType)
161-
.keyboardType(model.keyboardType)
162-
.disabled(!model.unsheathed)
163-
.autocorrectionDisabled(model.autoCorrectionDisabled)
164-
.focused($textFieldFocused)
165-
.frame(width: textFieldSize.width,
166-
height: textFieldSize.height)
167-
.padding([.leading],
168-
textFieldLeadingPadding)
169-
.padding([.trailing],
170-
textFieldTrailingPadding)
171-
.submitLabel(model.submitLabel)
172-
.onSubmit {
173-
model.onSubmitAction?()
174-
}
175141
}
176142
}
143+
.foregroundColor(model.textFieldTextColor)
144+
.textInputAutocapitalization(model.textInputAutocapitalization)
145+
.textContentType(model.textContentType)
146+
.keyboardType(model.keyboardType)
147+
.disabled(!model.unsheathed)
148+
.autocorrectionDisabled(model.autoCorrectionDisabled)
149+
.focused($textFieldFocused)
150+
.frame(width: textFieldSize.width,
151+
height: textFieldSize.height)
152+
.padding([.leading],
153+
textFieldLeadingPadding)
154+
.padding([.trailing],
155+
textFieldTrailingPadding)
156+
.submitLabel(model.submitLabel)
157+
.onSubmit {
158+
model.onSubmitAction?()
159+
}
177160
}
178161

179162
public var mainContainer: some View {

0 commit comments

Comments
 (0)