added disabled state

removed link

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-03-21 11:17:18 -05:00
parent c23e7f700b
commit b9f17f2af4

View File

@ -34,15 +34,9 @@ open class BreadcrumbItem: ButtonBase {
//--------------------------------------------------
// MARK: - Public Properties
//--------------------------------------------------
/// The Breadcrumb link to links to its respective page.
open var link: String? { didSet { setNeedsUpdate() } }
/// TextStyle used on the titleLabel.
open override var textStyle: TextStyle { isSelected ? TextStyle.boldBodySmall : TextStyle.bodySmall }
/// Whether the Control is selected or not.
open override var isSelected: Bool { didSet { setNeedsUpdate() } }
/// UIColor used on the titleLabel text.
open override var textColor: UIColor {
textColorConfiguration.getColor(self)
@ -58,6 +52,7 @@ open class BreadcrumbItem: ButtonBase {
//--------------------------------------------------
private var textColorConfiguration = ControlColorConfiguration().with {
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .normal)
$0.setSurfaceColors(VDSColor.interactiveActiveOnlight, VDSColor.interactiveActiveOndark, forState: .disabled)
$0.setSurfaceColors(VDSColor.interactiveActiveOnlight, VDSColor.interactiveActiveOndark, forState: .highlighted)
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .selected)
}
@ -85,7 +80,6 @@ open class BreadcrumbItem: ButtonBase {
super.reset()
shouldUpdateView = false
text = nil
link = nil
accessibilityCustomActions = []
isAccessibilityElement = true
accessibilityTraits = .button