refactored hexstring to uicolor
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
6a07bcdd4c
commit
aa3b11efc1
@ -81,7 +81,7 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
||||
/// Enum used to describe the background effect choices used for this component.
|
||||
public enum BackgroundEffect {
|
||||
case transparency
|
||||
case gradient(String, String)
|
||||
case gradient(UIColor, UIColor)
|
||||
case none
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
||||
}.eraseToAnyColorable()
|
||||
$0.shadowOffsetConfiguration = .init(.init(width: 0, height: 6), .zero)
|
||||
$0.shadowRadiusConfiguration = .init(8.0, 0.0)
|
||||
$0.shadowOpacityConfiguration = .init(0.01, 0.0)
|
||||
$0.shadowOpacityConfiguration = .init(0.1, 0.0)
|
||||
}
|
||||
|
||||
private var borderColorConfiguration = SurfaceColorConfiguration().with {
|
||||
@ -391,7 +391,7 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
||||
removeGradientLayer()
|
||||
case .gradient(let firstColor, let secondColor):
|
||||
alphaConfiguration = 1.0
|
||||
addGradientLayer(with: UIColor(hexString: firstColor), secondColor: UIColor(hexString: secondColor))
|
||||
addGradientLayer(with: firstColor, secondColor: secondColor)
|
||||
backgroundImageView.isHidden = true
|
||||
backgroundImageView.alpha = 1.0
|
||||
case .none:
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import VDSTokens
|
||||
import UIKit
|
||||
|
||||
extension TitleLockup {
|
||||
private static var textColorSecondaryConfiguration = SurfaceColorConfiguration(VDSColor.elementsSecondaryOnlight , VDSColor.elementsSecondaryOnlight).eraseToAnyColorable()
|
||||
@ -16,7 +17,7 @@ extension TitleLockup {
|
||||
public enum TextColor: Equatable {
|
||||
case primary
|
||||
case secondary
|
||||
case custom(String, String)
|
||||
case custom(UIColor, UIColor)
|
||||
|
||||
private var reflectedValue: String { String(reflecting: self) }
|
||||
|
||||
@ -31,15 +32,15 @@ extension TitleLockup {
|
||||
case .secondary:
|
||||
TitleLockup.textColorSecondaryConfiguration
|
||||
case .custom(let lightColor, let darkColor):
|
||||
SurfaceColorConfiguration(.init(hexString: lightColor), .init(hexString: darkColor)).eraseToAnyColorable()
|
||||
SurfaceColorConfiguration(lightColor, darkColor).eraseToAnyColorable()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum TitleTextColor: Equatable {
|
||||
case primary
|
||||
case custom(String, String)
|
||||
|
||||
case custom(UIColor, UIColor)
|
||||
|
||||
private var reflectedValue: String { String(reflecting: self) }
|
||||
|
||||
public static func == (lhs: Self, rhs: Self) -> Bool {
|
||||
@ -51,7 +52,7 @@ extension TitleLockup {
|
||||
case .primary:
|
||||
TitleLockup.textColorPrimaryConfiguration
|
||||
case .custom(let lightColor, let darkColor):
|
||||
SurfaceColorConfiguration(.init(hexString: lightColor), .init(hexString: darkColor)).eraseToAnyColorable()
|
||||
SurfaceColorConfiguration(lightColor, darkColor).eraseToAnyColorable()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user