updated rules on leading, max digits and trailing

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-08-09 13:39:37 -05:00
parent 05f7e6c9cc
commit 05c4effb98
2 changed files with 13 additions and 3 deletions

View File

@ -362,16 +362,21 @@ open class BadgeIndicator: View {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
text = formatter.string(from: .init(integerLiteral: maxBadgetCount))!
//leading
if let leadingCharacter, !leadingCharacter.isEmpty {
text = "\(leadingCharacter)\(text)"
} else if maximumDigits.value < "\(badgeCount)".count {
}
//maximumDigits
if maximumDigits.value < "\(badgeCount)".count {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
text = "\(text)+"
}
if let trailingText {
//trailing
if let trailingText, !trailingText.isEmpty {
text = "\(text) \(trailingText)"
}
}

View File

@ -1,3 +1,8 @@
1.0.39
=======
- CXTDT-423141 - Tabs - Selected Tab dark mode text color
- Badge Indicator update to latest specs from July
1.0.38
=======
- Fixed bug in Typography TitleLarge Font update for Mobile