From 97a110381ad9475dba73956f5fc005972cd3c45f Mon Sep 17 00:00:00 2001 From: Krishna Kishore Bandaru Date: Tue, 20 Feb 2024 20:59:12 +0530 Subject: [PATCH] Added Equatable to BackgroundColor --- VDS/Components/TileContainer/TileContainer.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/VDS/Components/TileContainer/TileContainer.swift b/VDS/Components/TileContainer/TileContainer.swift index 3bdb073f..6d4d515b 100644 --- a/VDS/Components/TileContainer/TileContainer.swift +++ b/VDS/Components/TileContainer/TileContainer.swift @@ -32,12 +32,19 @@ open class TileContainer: Control { // MARK: - Enums //-------------------------------------------------- /// Enum used to describe the background color choices used for this component. - public enum BackgroundColor { + public enum BackgroundColor: Equatable { + case primary case secondary case white case black case custom(String) + + private var reflectedValue: String { String(reflecting: self) } + + public static func == (lhs: Self, rhs: Self) -> Bool { + lhs.reflectedValue == rhs.reflectedValue + } } /// Enum used to describe the background effect choices used for this component.