diff --git a/VDS/Components/Tilet/Tilet.swift b/VDS/Components/Tilet/Tilet.swift index 117c185f..dea145af 100644 --- a/VDS/Components/Tilet/Tilet.swift +++ b/VDS/Components/Tilet/Tilet.swift @@ -59,6 +59,17 @@ open class Tilet: TileContainer { // MARK: - Public Properties //-------------------------------------------------- private var titleLockup = TitleLockup() + open override var surface: Surface { + didSet { + //flip the color + let flippedColor:ContainerBackgroundColor = surface == .dark ? .white : .black + containerBackgroundColor = flippedColor + + //flip the surface for the titleLockup + let flippedSurface: Surface = surface == .dark ? .light : .dark + titleLockup.surface = flippedSurface + } + } //-------------------------------------------------- // MARK: - Public Properties @@ -87,6 +98,7 @@ open class Tilet: TileContainer { open override func setup() { super.setup() + surface = .light addContentView(titleLockup) contentViewWithConstraint = titleLockup.widthAnchor.constraint(equalToConstant: width - (padding * 2)) contentViewWithConstraint?.isActive = true