Skip to content

Commit 07af638

Browse files
add missing docs
1 parent 4dddef4 commit 07af638

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import Foundation
22

33
extension InputFieldVM {
4+
/// Specifies the position of the title relative to the input field.
45
public enum TitlePosition {
6+
/// The title is displayed inside the input field.
57
case inside
8+
/// The title is displayed above the input field.
69
case outside
710
}
811
}

Sources/ComponentsKit/Components/InputField/Models/InputFieldVM.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ public struct InputFieldVM: ComponentVM {
88
/// Defaults to `.sentences`, which capitalizes the first letter of each sentence.
99
public var autocapitalization: TextAutocapitalization = .sentences
1010

11+
/// The caption displayed below the input field.
1112
public var caption: String?
1213

14+
/// The font used for the input field's caption.
15+
///
16+
/// If not provided, the font is automatically calculated based on the input field's size.
1317
public var captionFont: UniversalFont?
1418

1519
/// The color of the input field.
@@ -58,6 +62,9 @@ public struct InputFieldVM: ComponentVM {
5862
/// Defaults to `.medium`.
5963
public var size: ComponentSize = .medium
6064

65+
/// The visual style of the input field.
66+
///
67+
/// Defaults to `.light`.
6168
public var style: Style = .light
6269

6370
/// The type of the submit button on the keyboard.
@@ -73,8 +80,14 @@ public struct InputFieldVM: ComponentVM {
7380
/// The title displayed on the input field.
7481
public var title: String?
7582

83+
/// The font used for the input field's title.
84+
///
85+
/// If not provided, the font is automatically calculated based on the input field's size.
7686
public var titleFont: UniversalFont?
7787

88+
/// The position of the title relative to the input field.
89+
///
90+
/// Defaults to `.inside`.
7891
public var titlePosition: TitlePosition = .inside
7992

8093
/// Initializes a new instance of `InputFieldVM` with default values.

0 commit comments

Comments
 (0)