refactored color to surface

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-08-01 12:05:49 -05:00
parent b1253be64b
commit 63d5b97de6
2 changed files with 6 additions and 1 deletions

View File

@ -377,7 +377,7 @@ import Combine
}, completion: nil) }, completion: nil)
} }
backgroundColor = viewModel.surface == .dark ? VDSColor.backgroundPrimaryDark : .clear backgroundColor = viewModel.surface.color
isUserInteractionEnabled = !viewModel.disabled isUserInteractionEnabled = !viewModel.disabled
setAccessibilityHint(enabled) setAccessibilityHint(enabled)

View File

@ -6,9 +6,14 @@
// //
import Foundation import Foundation
import UIKit
import VDSColorTokens
public enum Surface: String, Codable { public enum Surface: String, Codable {
case light, dark case light, dark
public var color: UIColor {
return self == .dark ? VDSColor.backgroundPrimaryDark : .clear
}
} }
public protocol Surfaceable { public protocol Surfaceable {