vds_ios/VDS/Protocols/Surfaceable.swift
Matt Bruce 5007b4fc28 more contrast for light surface color
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2024-04-19 12:41:43 -05:00

24 lines
634 B
Swift

//
// Surfaceable.swift
// VDS
//
// Created by Matt Bruce on 7/26/22.
//
import Foundation
import UIKit
import VDSTokens
/// The background tint that the component will be placed on. This will automatically adjust other elements as needed and takes "light" or "dark"
public enum Surface: String, Equatable {
case light, dark
public var color: UIColor {
return self == .dark ? VDSColor.backgroundPrimaryDark : .init(hexString: "#E3E3E3")
}
}
public protocol Surfaceable {
/// Current Surface and this is used to pass down to child objects that implement Surfacable
var surface: Surface { get set }
}