From 7eddaf1d0433038ef081dc72ef6ac718f9d3eda7 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 18 Apr 2024 14:18:40 -0500 Subject: [PATCH 1/2] added selected Icon Color Configuration Signed-off-by: Matt Bruce --- VDS/Components/Icon/ButtonIcon/ButtonIcon.swift | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 + } } } From 229b7c75649dcfabf1bc88ca11895f8482b4d599 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 18 Apr 2024 15:57:58 -0500 Subject: [PATCH 2/2] CXTDT-544442- Button Icon - Selected state needs to allow custom color Signed-off-by: Matt Bruce --- VDS/SupportingFiles/ReleaseNotes.txt | 4 ++++ 1 file changed, 4 insertions(+) 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