Digital ACT-191 ONEAPP-9311 story: update color configurations to stepper text for default and disabled states

This commit is contained in:
Vasavi Kanamarlapudi 2024-07-15 15:08:32 +05:30
parent 6c26655cbb
commit 29d00ec352

View File

@ -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