diff --git a/VDS/Classes/ColorConfiguration.swift b/VDS/Classes/ColorConfiguration.swift index 43777b4c..65d84f41 100644 --- a/VDS/Classes/ColorConfiguration.swift +++ b/VDS/Classes/ColorConfiguration.swift @@ -17,6 +17,10 @@ public protocol BinaryColorable{ var userTrueColor: Bool { get } } +extension BinaryColorable where Self: Selectable { + public var userTrueColor: Bool { return selected } +} + /// Meant to be used in a Object that implements the following interfaces for 2 possible color combinations /// - Surfaceable (var surface: Surface) /// diff --git a/VDS/Components/Checkbox/CheckboxModel.swift b/VDS/Components/Checkbox/CheckboxModel.swift index f6d76d30..d9720d26 100644 --- a/VDS/Components/Checkbox/CheckboxModel.swift +++ b/VDS/Components/Checkbox/CheckboxModel.swift @@ -16,7 +16,6 @@ public protocol CheckboxModel: Modelable, FormFieldable, Errorable, DataTrackabl } extension CheckboxModel { - public var userTrueColor: Bool { return selected } public var shouldShowError: Bool { guard hasError && !disabled && errorText?.isEmpty == false else { return false } diff --git a/VDS/Components/RadioBox/RadioBoxModel.swift b/VDS/Components/RadioBox/RadioBoxModel.swift index d8f634f5..de8359f7 100644 --- a/VDS/Components/RadioBox/RadioBoxModel.swift +++ b/VDS/Components/RadioBox/RadioBoxModel.swift @@ -19,7 +19,6 @@ public protocol RadioBoxModel: Modelable, FormFieldable, Errorable, DataTrackabl } extension RadioBoxModel { - public var userTrueColor: Bool { return selected } public var shouldShowError: Bool { guard hasError && !disabled && errorText?.isEmpty == false else { return false } diff --git a/VDS/Components/RadioButton/RadioButtonModel.swift b/VDS/Components/RadioButton/RadioButtonModel.swift index 9d1f2d82..6a7567eb 100644 --- a/VDS/Components/RadioButton/RadioButtonModel.swift +++ b/VDS/Components/RadioButton/RadioButtonModel.swift @@ -16,7 +16,6 @@ public protocol RadioButtonModel: Modelable, FormFieldable, Errorable, DataTrack } extension RadioButtonModel { - public var userTrueColor: Bool { return selected } public var shouldShowError: Bool { guard hasError && !disabled && errorText?.isEmpty == false else { return false }