vds_ios/VDS/Protocols/Useable.swift
Jarrod Courtney a22bbbc2b3 added buttonSize selector
Signed-off-by: Jarrod Courtney <jarrod.courtney@gmail.com>
2022-09-23 13:42:42 -05:00

44 lines
864 B
Swift

//
// Useable.swift
// VDS
//
// Created by Jarrod Courtney on 9/22/22.
//
import Foundation
import UIKit
import VDSColorTokens
public enum Use: String, Codable, Equatable {
case primary, secondary
public var color: UIColor {
return self == .primary ? VDSColor.backgroundPrimaryDark : .clear
}
public enum Size: String, Codable {
case large
case small
func getHeight() -> CGFloat {
switch self {
case .large:
return 44
case .small:
return 32
}
}
func minimumWidth() -> CGFloat {
switch self {
case .large:
return 76
case .small:
return 60
}
}
}
}
public protocol Useable {
var use: Use { get set }
}