From 2b82f4a90cac035edfea907a9ab27a8dfc5c717b Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 9 Aug 2023 13:28:58 -0500 Subject: [PATCH] added trailing text Signed-off-by: Matt Bruce --- VDS/Components/BadgeIndicator/BadgeIndicator.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/VDS/Components/BadgeIndicator/BadgeIndicator.swift b/VDS/Components/BadgeIndicator/BadgeIndicator.swift index b969d13e..09b403dd 100644 --- a/VDS/Components/BadgeIndicator/BadgeIndicator.swift +++ b/VDS/Components/BadgeIndicator/BadgeIndicator.swift @@ -165,7 +165,10 @@ open class BadgeIndicator: View { /// Character that is always at the begging. Accepts any character and if unaffected by maximumDigits. open var leadingCharacter: String? { didSet { setNeedsUpdate() }} - + + /// Accepts any text or character. It is unaffected by maximumDigits. + open var trailingText: String? { didSet { setNeedsUpdate() }} + /// Determines the size of the Badge Indicator as well as the textStyle and padding used. open var size: Size = .xxlarge { didSet { setNeedsUpdate() }} @@ -368,6 +371,9 @@ open class BadgeIndicator: View { text = "\(text)+" } + if let trailingText { + text = "\(text) \(trailingText)" + } } return text }