File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed
Examples/DemosApp/DemosApp/ComponentsPreview/PreviewPages
Sources/ComponentsKit/Components/InputField Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ struct InputFieldPreview: View {
6464 Picker ( " Style " , selection: self . $model. style) {
6565 Text ( " Light " ) . tag ( InputFieldVM . Style. light)
6666 Text ( " Bordered " ) . tag ( InputFieldVM . Style. bordered)
67+ Text ( " Faded " ) . tag ( InputFieldVM . Style. faded)
6768 }
6869 SubmitTypePicker ( selection: self . $model. submitType)
6970 UniversalColorPicker (
@@ -99,7 +100,7 @@ struct InputFieldPreview: View {
99100
100101 private static let title = " Email "
101102 private static let placeholder = " Enter your email "
102- private static let caption = " We'll send you a verification code"
103+ private static let caption = " Your email address will be used to send a verification code"
103104 private static var initialModel : InputFieldVM {
104105 return . init {
105106 $0. title = Self . title
Original file line number Diff line number Diff line change 11import Foundation
22
33extension InputFieldVM {
4+ /// The input fields appearance style.
45 public enum Style : Hashable {
6+ /// An input field with a partially transparent background.
57 case light
8+ /// An input field with a transparent background and a border.
69 case bordered
10+ /// An input field with a partially transparent background and a border.
11+ case faded
712 }
813}
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ extension InputFieldVM {
151151 }
152152 var backgroundColor : UniversalColor {
153153 switch self . style {
154- case . light:
154+ case . light, . faded :
155155 return self . color? . background ?? . content1
156156 case . bordered:
157157 return . background
@@ -174,7 +174,7 @@ extension InputFieldVM {
174174 switch self . style {
175175 case . light:
176176 return 0
177- case . bordered:
177+ case . bordered, . faded :
178178 switch self . size {
179179 case . small:
180180 return BorderWidth . small. value
Original file line number Diff line number Diff line change @@ -257,6 +257,7 @@ extension UKInputField {
257257 label. isVisible = model. caption. isNotNilAndEmpty
258258 label. textColor = model. captionColor. uiColor
259259 label. font = model. preferredCaptionFont. uiFont
260+ label. numberOfLines = 0
260261 }
261262 static func horizontalStackView(
262263 _ stackView: UIStackView ,
You can’t perform that action at this time.
0 commit comments