diff --git a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift index f130f52f..864397d3 100644 --- a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift +++ b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift @@ -138,6 +138,8 @@ open class ButtonIcon: Control, Changeable, FormFieldable { /// Icon Name used within the Icon within the Selected State. open var selectedIconName: Icon.Name? { didSet { setNeedsUpdate() } } + open var selectedIconColorConfiguration: SurfaceColorConfiguration? { didSet { setNeedsUpdate() } } + /// Sets the size of button icon and icon. open var size: Size = .large { didSet { setNeedsUpdate() } } @@ -180,12 +182,16 @@ open class ButtonIcon: Control, Changeable, FormFieldable { // MARK: - Configuration //-------------------------------------------------- private var iconColorConfiguration: AnyColorable { - if kind == .highContrast { - return highContrastIconColorConfiguration - } else if kind == .lowContrast { - return (surfaceType == .colorFill) ? lowContrastIconColorConfiguration : (floating ? lowContrastIconColorConfiguration : standardIconColorConfiguration) + if let selectedIconColorConfiguration, isSelected { + return selectedIconColorConfiguration.eraseToAnyColorable() } else { - return standardIconColorConfiguration + if kind == .highContrast { + return highContrastIconColorConfiguration + } else if kind == .lowContrast { + return (surfaceType == .colorFill) ? lowContrastIconColorConfiguration : (floating ? lowContrastIconColorConfiguration : standardIconColorConfiguration) + } else { + return standardIconColorConfiguration + } } } diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 6f3c0804..c5d7ff83 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,7 @@ +1.0.60 +---------------- +CXTDT-544442- Button Icon - Selected state needs to allow custom color + 1.0.59 ---------------- - ONEAPP-7135 - DropdownSelect - Finished Development