From 47004d00c13df295f01380c99d87ef0ae0f08bb4 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Thu, 19 Jan 2023 11:58:38 +0100 Subject: [PATCH] Add Medium Light & Dark theme --- .../Sources/DesignSystem/ColorSet.swift | 24 +++++++++++++++++++ .../Sources/DesignSystem/Theme.swift | 2 ++ .../DesignSystem/Views/ThemePreviewView.swift | 4 ++++ 3 files changed, 30 insertions(+) diff --git a/Packages/DesignSystem/Sources/DesignSystem/ColorSet.swift b/Packages/DesignSystem/Sources/DesignSystem/ColorSet.swift index 3b8463b8..5dd91341 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/ColorSet.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/ColorSet.swift @@ -19,6 +19,8 @@ public enum ColorSetName: String { case desertLight = "Desert - Light" case nemesisDark = "Nemesis - Dark" case nemesisLight = "Nemesis - Light" + case mediumLight = "Medium - Light" + case mediumDark = "Medium - Dark" } public struct IceCubeDark: ColorSet { @@ -86,3 +88,25 @@ public struct NemesisLight: ColorSet { public init() {} } + +public struct MediumDark: ColorSet { + public var name: ColorSetName = .mediumDark + public var scheme: ColorScheme = .dark + public var tintColor: Color = .init(hex: 0x1A8917) + public var primaryBackgroundColor: Color = .init(hex: 0x121212) + public var secondaryBackgroundColor: Color = .init(hex: 0x191919) + public var labelColor: Color = .white + + public init() {} +} + +public struct MediumLight: ColorSet { + public var name: ColorSetName = .mediumLight + public var scheme: ColorScheme = .light + public var tintColor: Color = .init(hex: 0x1A8917) + public var primaryBackgroundColor: Color = .init(hex: 0xFFFFFF) + public var secondaryBackgroundColor: Color = .init(hex: 0xFAFAFA) + public var labelColor: Color = .black + + public init() {} +} diff --git a/Packages/DesignSystem/Sources/DesignSystem/Theme.swift b/Packages/DesignSystem/Sources/DesignSystem/Theme.swift index cc49dc5e..c6093d57 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Theme.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Theme.swift @@ -128,6 +128,8 @@ public class Theme: ObservableObject { DesertLight(), NemesisDark(), NemesisLight(), + MediumLight(), + MediumDark(), ] } diff --git a/Packages/DesignSystem/Sources/DesignSystem/Views/ThemePreviewView.swift b/Packages/DesignSystem/Sources/DesignSystem/Views/ThemePreviewView.swift index 28a3ed7e..5a427738 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Views/ThemePreviewView.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Views/ThemePreviewView.swift @@ -22,6 +22,10 @@ public struct ThemePreviewView: View { ThemeBoxView(color: NemesisDark()) ThemeBoxView(color: NemesisLight()) } + HStack(spacing: gutterSpace) { + ThemeBoxView(color: MediumDark()) + ThemeBoxView(color: MediumLight()) + } } .padding(4) .frame(maxHeight: .infinity)