Various improvements

This commit is contained in:
Ilya Laktyushin
2025-03-11 18:48:35 +04:00
parent 80cd8f7b32
commit bafbe20063
38 changed files with 434 additions and 156 deletions

View File

@@ -9,6 +9,7 @@ public final class SolidRoundedButtonComponent: Component {
public typealias Theme = SolidRoundedButtonTheme
public let title: String?
public let subtitle: String?
public let label: String?
public let badge: String?
public let icon: UIImage?
@@ -28,6 +29,7 @@ public final class SolidRoundedButtonComponent: Component {
public init(
title: String? = nil,
subtitle: String? = nil,
label: String? = nil,
badge: String? = nil,
icon: UIImage? = nil,
@@ -46,6 +48,7 @@ public final class SolidRoundedButtonComponent: Component {
action: @escaping () -> Void
) {
self.title = title
self.subtitle = subtitle
self.label = label
self.badge = badge
self.icon = icon
@@ -68,6 +71,9 @@ public final class SolidRoundedButtonComponent: Component {
if lhs.title != rhs.title {
return false
}
if lhs.subtitle != rhs.subtitle {
return false
}
if lhs.label != rhs.label {
return false
}
@@ -147,6 +153,7 @@ public final class SolidRoundedButtonComponent: Component {
if let button = self.button {
button.title = component.title
button.subtitle = component.subtitle
button.label = component.label
button.badge = component.badge
button.iconPosition = component.iconPosition