24 lines
640 B
Swift
24 lines
640 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 : VDSColor.backgroundSecondaryLight
|
|
}
|
|
}
|
|
|
|
public protocol Surfaceable {
|
|
/// Current Surface and this is used to pass down to child objects that implement Surfacable
|
|
var surface: Surface { get set }
|
|
}
|