color configuration updates

This commit is contained in:
Sumanth Nadigadda 2023-03-17 11:42:05 +05:30
parent 2383b5282c
commit c3ba748728

View File

@ -86,13 +86,13 @@ public class Notification: View {
//--------------------------------------------------
// MARK: - Configuration
//--------------------------------------------------
private var backgroundColorConfiguration: KeyedColorConfiguration<NotificationStyle, Notification> = {
let config = KeyedColorConfiguration<NotificationStyle, Notification>(keyName: "type")
private var backgroundColorConfiguration: AnyColorable = {
let config = KeyedColorConfiguration<Notification, NotificationStyle>(keyPath: \.type)
config.setSurfaceColors(VDSColor.feedbackInformationBackgroundOnlight, VDSColor.feedbackInformationBackgroundOndark, forKey: .info)
config.setSurfaceColors(VDSColor.feedbackWarningBackgroundOnlight, VDSColor.feedbackWarningBackgroundOndark, forKey: .warning)
config.setSurfaceColors(VDSColor.feedbackSuccessBackgroundOnlight, VDSColor.feedbackSuccessBackgroundOndark, forKey: .success)
config.setSurfaceColors(VDSColor.feedbackErrorBackgroundOnlight, VDSColor.feedbackErrorBackgroundOndark, forKey: .error)
return config
return config.eraseToAnyColorable()
}()
private var textColorConfig = ViewColorConfiguration()