Merge branch 'feature/badgeIndicator' into 'develop'
added paletteYellow62 as extension and new color array See merge request BPHV_MIPS/vds_ios!81
This commit is contained in:
commit
ef75a8fe2c
@ -216,7 +216,7 @@ open class BadgeIndicator: View {
|
||||
private var backgroundColorConfiguration: AnyColorable = {
|
||||
let config = KeyedColorConfiguration<BadgeIndicator, FillColor>(keyPath: \.fillColor)
|
||||
config.setSurfaceColors(VDSColor.backgroundBrandhighlight, VDSColor.backgroundBrandhighlight, forKey: .red)
|
||||
config.setSurfaceColors(VDSColor.paletteYellow53, VDSColor.paletteYellow53, forKey: .yellow)
|
||||
config.setSurfaceColors(VDSColor.paletteYellow62, VDSColor.paletteYellow62, forKey: .yellow)
|
||||
config.setSurfaceColors(VDSColor.paletteGreen26, VDSColor.paletteGreen36, forKey: .green)
|
||||
config.setSurfaceColors(VDSColor.paletteOrange41, VDSColor.paletteOrange58, forKey: .orange)
|
||||
config.setSurfaceColors(VDSColor.paletteBlue38, VDSColor.paletteBlue46, forKey: .blue)
|
||||
|
||||
@ -8,8 +8,11 @@
|
||||
import Foundation
|
||||
import VDSColorTokens
|
||||
|
||||
extension VDSColor {
|
||||
public static let paletteYellow62 = UIColor(hexString: "#FED60E")
|
||||
}
|
||||
|
||||
extension UIColor {
|
||||
|
||||
/// Since VDSColorTokens is just a Class with Static Properties, this is an Enum for each property of that class for each of use within the VDS Library
|
||||
public enum VDSColor: String, CaseIterable {
|
||||
case paletteBlack
|
||||
@ -31,6 +34,7 @@ extension UIColor {
|
||||
case paletteYellow94
|
||||
case paletteYellow87
|
||||
case paletteYellow74
|
||||
case paletteYellow62
|
||||
case paletteYellow53
|
||||
case paletteYellow39
|
||||
case paletteYellow20
|
||||
|
||||
@ -23,13 +23,22 @@ public enum TextPosition: String, CaseIterable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct TextStyle: Equatable {
|
||||
public struct TextStyle: Equatable, RawRepresentable {
|
||||
public let rawValue: String
|
||||
public let pointSize: CGFloat
|
||||
public let lineHeight: CGFloat
|
||||
public let letterSpacing: CGFloat
|
||||
public let fontFace: Fonts
|
||||
|
||||
public init?(rawValue: String) {
|
||||
guard let style = TextStyle.textStyle(for: rawValue) else { return nil }
|
||||
self.rawValue = style.rawValue
|
||||
self.pointSize = style.pointSize
|
||||
self.lineHeight = style.lineHeight
|
||||
self.letterSpacing = style.letterSpacing
|
||||
self.fontFace = style.fontFace
|
||||
}
|
||||
|
||||
public init(rawValue: String, fontFace: Fonts, pointSize: CGFloat, lineHeight: CGFloat, letterSpacing: CGFloat) {
|
||||
self.rawValue = rawValue
|
||||
self.fontFace = fontFace
|
||||
|
||||
Loading…
Reference in New Issue
Block a user