From 29d00ec352e99b8f149109a1944aa68ee8330c3e Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Mon, 15 Jul 2024 15:08:32 +0530 Subject: [PATCH] Digital ACT-191 ONEAPP-9311 story: update color configurations to stepper text for default and disabled states --- VDS/Components/InputStepper/InputStepper.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/VDS/Components/InputStepper/InputStepper.swift b/VDS/Components/InputStepper/InputStepper.swift index 8cfe49a4..752937ba 100644 --- a/VDS/Components/InputStepper/InputStepper.swift +++ b/VDS/Components/InputStepper/InputStepper.swift @@ -123,7 +123,13 @@ open class InputStepper: EntryFieldBase { $0.textStyle = .boldBodyLarge $0.backgroundColor = .clear } - + + //-------------------------------------------------- + // MARK: - Configuration + //-------------------------------------------------- + private var labelColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsPrimaryOnlight , VDSColor.elementsPrimaryOndark) + private var labelDisabledColorConfiguration = SurfaceColorConfiguration(VDSColor.interactiveDisabledOnlight , VDSColor.interactiveDisabledOndark) + //-------------------------------------------------- // MARK: - Lifecycle //-------------------------------------------------- @@ -195,6 +201,7 @@ open class InputStepper: EntryFieldBase { } internal func updateButtonStates() { + textLabel.textColorConfiguration = !isEnabled ? labelDisabledColorConfiguration.eraseToAnyColorable() : labelColorConfiguration.eraseToAnyColorable() if isReadOnly || !isEnabled { decrementButton.isEnabled = false incrementButton.isEnabled = false