updated rules on leading, max digits and trailing
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
05f7e6c9cc
commit
05c4effb98
@ -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)"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user