Skip to content

Commit d746cff

Browse files
Merge pull request #260 from skyflowapi/public-release/1.22.0
SK-1034 updated style for label and error
2 parents ba07265 + 6cc3a78 commit d746cff

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

Sources/Skyflow/elements/TextField.swift

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,26 @@ public class TextField: SkyflowElement, Element, BaseElement {
336336
NSLayoutConstraint.activate([
337337
self.textField.heightAnchor.constraint(equalToConstant: (collectInput.inputStyles.base?.height)!)
338338
])
339-
339+
}
340+
if collectInput.errorTextStyles.base?.height != nil {
341+
NSLayoutConstraint.activate([
342+
self.errorMessage.heightAnchor.constraint(equalToConstant: (collectInput.errorTextStyles.base?.height)!)
343+
])
344+
}
345+
if collectInput.errorTextStyles.base?.width != nil {
346+
NSLayoutConstraint.activate([
347+
self.errorMessage.widthAnchor.constraint(equalToConstant: (collectInput.errorTextStyles.base?.width)!)
348+
])
349+
}
350+
if collectInput.labelStyles.base?.height != nil {
351+
NSLayoutConstraint.activate([
352+
self.textFieldLabel.heightAnchor.constraint(equalToConstant: (collectInput.labelStyles.base?.height)!)
353+
])
354+
}
355+
if collectInput.labelStyles.base?.width != nil {
356+
NSLayoutConstraint.activate([
357+
self.textFieldLabel.widthAnchor.constraint(equalToConstant: (collectInput.labelStyles.base?.width)!)
358+
])
340359
}
341360

342361
self.textFieldLabel.textColor = collectInput.labelStyles.base?.textColor ?? .none

0 commit comments

Comments
 (0)