Skip to content

Commit a185afb

Browse files
update docs
1 parent 93c416c commit a185afb

File tree

8 files changed

+13
-12
lines changed

8 files changed

+13
-12
lines changed

Sources/ComponentsKit/Components/Card/CardVM.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22

33
/// A model that defines the appearance properties for a card component.
44
public struct CardVM: ComponentVM {
5-
/// The background color of the card's content area.
5+
/// The background color of the card.
66
public var backgroundColor: UniversalColor?
77

88
/// The padding applied to the card's content area.

Sources/ComponentsKit/Components/Card/UKCard.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ open class UKCard: UIView, UKComponent {
102102
self.layer.shadowPath = UIBezierPath(rect: self.bounds).cgPath
103103
}
104104

105+
/// Updates appearance when the model changes.
105106
open func update(_ oldValue: CardVM) {
106107
guard self.model != oldValue else { return }
107108

@@ -112,9 +113,9 @@ open class UKCard: UIView, UKComponent {
112113
self.contentConstraints.bottom?.constant = -self.model.contentPaddings.bottom
113114
self.contentConstraints.leading?.constant = self.model.contentPaddings.leading
114115
self.contentConstraints.trailing?.constant = -self.model.contentPaddings.trailing
115-
}
116116

117-
self.layoutIfNeeded()
117+
self.layoutIfNeeded()
118+
}
118119
}
119120

120121
// MARK: - UIView Methods

Sources/ComponentsKit/Helpers/Paddings.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import UIKit
1+
import Foundation
22

33
/// Defines padding values for each edge.
44
public struct Paddings: Hashable {

Sources/ComponentsKit/Modal/Models/BottomModalVM.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22

33
/// A model that defines the appearance properties for a bottom modal component.
44
public struct BottomModalVM: ModalVM {
5-
/// The background color of the modal's content area.
5+
/// The background color of the modal.
66
public var backgroundColor: UniversalColor?
77

88
/// A Boolean value indicating whether the modal should close when tapping on the overlay.

Sources/ComponentsKit/Modal/Models/CenterModalVM.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22

33
/// A model that defines the appearance properties for a center modal component.
44
public struct CenterModalVM: ModalVM {
5-
/// The background color of the modal's content area.
5+
/// The background color of the modal.
66
public var backgroundColor: UniversalColor?
77

88
/// A Boolean value indicating whether the modal should close when tapping on the overlay.

Sources/ComponentsKit/Modal/Models/ModalVM.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22

33
/// A model that defines generic appearance properties that can be in any modal component.
44
public protocol ModalVM: ComponentVM {
5-
/// The background color of the modal's content area.
5+
/// The background color of the modal.
66
var backgroundColor: UniversalColor? { get set }
77

88
/// A Boolean value indicating whether the modal should close when tapping on the overlay.

Sources/ComponentsKit/Modal/UIKit/UKModalController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ open class UKModalController<VM: ModalVM>: UIViewController {
106106

107107
// MARK: - Style
108108

109-
/// Applies styling to the modal's components based on the model.
109+
/// Applies styling to the modal's subviews.
110110
open func style() {
111111
Self.Style.overlay(self.overlay, model: self.model)
112112
Self.Style.container(self.container, model: self.model)
@@ -116,7 +116,7 @@ open class UKModalController<VM: ModalVM>: UIViewController {
116116

117117
// MARK: - Layout
118118

119-
/// Configures the layout of the modal's components.
119+
/// Configures the layout of the modal's subviews.
120120
open func layout() {
121121
self.overlay.allEdges()
122122
self.content.allEdges()

Sources/ComponentsKit/Shared/Types/Shadow.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import Foundation
44
public enum Shadow: Hashable {
55
/// No shadow is applied.
66
case none
7-
/// A small shadow, using a predefined configuration.
7+
/// A small shadow.
88
case small
9-
/// A medium shadow, using a predefined configuration.
9+
/// A medium shadow.
1010
case medium
11-
/// A large shadow, using a predefined configuration.
11+
/// A large shadow.
1212
case large
1313
/// A custom shadow with specific parameters.
1414
///

0 commit comments

Comments
 (0)