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)
}
backgroundColor = viewModel.surface == .dark ? VDSColor.backgroundPrimaryDark : .clear
backgroundColor = viewModel.surface.color
isUserInteractionEnabled = !viewModel.disabled
setAccessibilityHint(enabled)

View File

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