File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public protocol ModalVM: ComponentVM {
3737
3838extension ModalVM {
3939 var preferredBackgroundColor : UniversalColor {
40- return self . backgroundColor? . blended ( with : . background ) ?? . themed(
40+ return self . backgroundColor ?? . themed(
4141 light: UniversalColor . background. light,
4242 dark: UniversalColor . secondaryBackground. dark
4343 )
Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ public struct ComponentColor: Hashable {
1111 public let contrast : UniversalColor
1212
1313 /// The background color for the component.
14- public let background : UniversalColor
14+ public var background : UniversalColor {
15+ return self . _background ?? self . main. withOpacity ( 0.15 ) . blended ( with: . background)
16+ }
17+
18+ private let _background : UniversalColor ?
1519
1620 // MARK: - Initialization
1721
@@ -28,6 +32,6 @@ public struct ComponentColor: Hashable {
2832 ) {
2933 self . main = main
3034 self . contrast = contrast
31- self . background = background ?? main . withOpacity ( 0.15 )
35+ self . _background = background
3236 }
3337}
You can’t perform that action at this time.
0 commit comments