diff --git a/VDS/Components/BadgeIndicator/BadgeIndicator.swift b/VDS/Components/BadgeIndicator/BadgeIndicator.swift index 0bafa46d..3f202b01 100644 --- a/VDS/Components/BadgeIndicator/BadgeIndicator.swift +++ b/VDS/Components/BadgeIndicator/BadgeIndicator.swift @@ -216,7 +216,7 @@ open class BadgeIndicator: View { private var backgroundColorConfiguration: AnyColorable = { let config = KeyedColorConfiguration(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) diff --git a/VDS/Extensions/UIColor+VDSColor.swift b/VDS/Extensions/UIColor+VDSColor.swift index e06c4f50..8717ab6b 100644 --- a/VDS/Extensions/UIColor+VDSColor.swift +++ b/VDS/Extensions/UIColor+VDSColor.swift @@ -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 diff --git a/VDS/Typography/Typography.swift b/VDS/Typography/Typography.swift index 8d815ad3..3759cb26 100644 --- a/VDS/Typography/Typography.swift +++ b/VDS/Typography/Typography.swift @@ -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