added disabled state
removed link Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c23e7f700b
commit
b9f17f2af4
@ -34,15 +34,9 @@ open class BreadcrumbItem: ButtonBase {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Public Properties
|
// MARK: - Public Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
/// The Breadcrumb link to links to its respective page.
|
|
||||||
open var link: String? { didSet { setNeedsUpdate() } }
|
|
||||||
|
|
||||||
/// TextStyle used on the titleLabel.
|
/// TextStyle used on the titleLabel.
|
||||||
open override var textStyle: TextStyle { isSelected ? TextStyle.boldBodySmall : TextStyle.bodySmall }
|
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.
|
/// UIColor used on the titleLabel text.
|
||||||
open override var textColor: UIColor {
|
open override var textColor: UIColor {
|
||||||
textColorConfiguration.getColor(self)
|
textColorConfiguration.getColor(self)
|
||||||
@ -58,6 +52,7 @@ open class BreadcrumbItem: ButtonBase {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
private var textColorConfiguration = ControlColorConfiguration().with {
|
private var textColorConfiguration = ControlColorConfiguration().with {
|
||||||
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .normal)
|
$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.interactiveActiveOnlight, VDSColor.interactiveActiveOndark, forState: .highlighted)
|
||||||
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .selected)
|
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .selected)
|
||||||
}
|
}
|
||||||
@ -85,7 +80,6 @@ open class BreadcrumbItem: ButtonBase {
|
|||||||
super.reset()
|
super.reset()
|
||||||
shouldUpdateView = false
|
shouldUpdateView = false
|
||||||
text = nil
|
text = nil
|
||||||
link = nil
|
|
||||||
accessibilityCustomActions = []
|
accessibilityCustomActions = []
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .button
|
accessibilityTraits = .button
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user