[WIP] Star refs

This commit is contained in:
Isaac
2024-11-28 16:13:06 +04:00
parent 17bd869ddd
commit be83150aba
59 changed files with 3764 additions and 717 deletions

View File

@@ -114,6 +114,7 @@ public final class ButtonTextContentComponent: Component {
public let text: String
public let badge: Int
public let textColor: UIColor
public let fontSize: CGFloat
public let badgeBackground: UIColor
public let badgeForeground: UIColor
public let badgeStyle: BadgeStyle
@@ -124,6 +125,7 @@ public final class ButtonTextContentComponent: Component {
text: String,
badge: Int,
textColor: UIColor,
fontSize: CGFloat = 17.0,
badgeBackground: UIColor,
badgeForeground: UIColor,
badgeStyle: BadgeStyle = .round,
@@ -133,6 +135,7 @@ public final class ButtonTextContentComponent: Component {
self.text = text
self.badge = badge
self.textColor = textColor
self.fontSize = fontSize
self.badgeBackground = badgeBackground
self.badgeForeground = badgeForeground
self.badgeStyle = badgeStyle
@@ -150,6 +153,9 @@ public final class ButtonTextContentComponent: Component {
if lhs.textColor != rhs.textColor {
return false
}
if lhs.fontSize != rhs.fontSize {
return false
}
if lhs.badgeBackground != rhs.badgeBackground {
return false
}
@@ -202,7 +208,7 @@ public final class ButtonTextContentComponent: Component {
transition: .immediate,
component: AnyComponent(Text(
text: component.text,
font: Font.semibold(17.0),
font: Font.semibold(component.fontSize),
color: component.textColor
)),
environment: {},